From 290ee3c48d1516e32869a3ff088fa5b349b0283d Mon Sep 17 00:00:00 2001 From: Eric Crosson Date: Tue, 19 Jul 2022 18:51:37 -0500 Subject: [PATCH] refactor: replace assert deepEqual with equal Performance gains? OCD? Consistency? Pick your flavor of the day :grin: --- packages/superagent-wrapper/test/request.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/superagent-wrapper/test/request.test.ts b/packages/superagent-wrapper/test/request.test.ts index 3669f6e3..04922890 100644 --- a/packages/superagent-wrapper/test/request.test.ts +++ b/packages/superagent-wrapper/test/request.test.ts @@ -184,7 +184,7 @@ describe('request', () => { .then(() => '') .catch((err) => (err instanceof DecodeError ? err.message : '')); - assert.deepEqual(result, 'Unexpected response 401: {"message":"unauthorized"}'); + assert.equal(result, 'Unexpected response 401: {"message":"unauthorized"}'); }); it('throws for unknown responses', async () => { @@ -195,7 +195,7 @@ describe('request', () => { .then(() => '') .catch((err) => (err instanceof DecodeError ? err.message : '')); - assert.deepEqual(result, 'Unexpected response 400: {"error":"bad request"}'); + assert.equal(result, 'Unexpected response 400: {"error":"bad request"}'); }); it('throws for decode errors', async () => { @@ -206,7 +206,7 @@ describe('request', () => { .then(() => '') .catch((err) => (err instanceof DecodeError ? err.message : '')); - assert.deepEqual(result, 'Could not decode response 200: {"invalid":"response"}'); + assert.equal(result, 'Could not decode response 200: {"invalid":"response"}'); }); });