diff --git a/tests/unit/resources/methods.test.ts b/tests/unit/resources/methods.test.ts index 3d9ac7fa..dff843a5 100644 --- a/tests/unit/resources/methods.test.ts +++ b/tests/unit/resources/methods.test.ts @@ -46,7 +46,7 @@ describe('methods', () => { }) .catch(err => { expect(err).toBeInstanceOf(ApiError); - expect(err.getMessage()).toEqual(error.detail); + expect(err.message).toEqual(error.detail); }); }); }); @@ -57,7 +57,7 @@ describe('methods', () => { return new Promise(resolve => { methods.get('foo', {}, (err: any, result) => { expect(err).toBeInstanceOf(ApiError); - expect(err.getMessage()).toEqual(error.detail); + expect(err.message).toEqual(error.detail); expect(result).toBeUndefined(); resolve(); });