From c82924766b777c8ef78fa01fa60273572b67eac7 Mon Sep 17 00:00:00 2001 From: Tushar Pandey Date: Wed, 21 Aug 2024 12:03:46 +0530 Subject: [PATCH] remove extra lodash dependancy --- package.json | 2 -- test/management/self-service-profiles.test.ts | 17 ++++++----------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index f4257cd8b..fbbab3d6b 100644 --- a/package.json +++ b/package.json @@ -51,13 +51,11 @@ "homepage": "https://github.com/auth0/node-auth0", "dependencies": { "jose": "^4.13.2", - "lodash-es": "^4.17.21", "undici-types": "^6.15.0", "uuid": "^9.0.0" }, "devDependencies": { "@types/jest": "^29.5.0", - "@types/lodash-es": "^4.17.12", "@types/node": "^16.18.37", "@types/node-fetch": "^2.6.3", "@types/uuid": "^9.0.1", diff --git a/test/management/self-service-profiles.test.ts b/test/management/self-service-profiles.test.ts index e8fe4f0d8..b2b5ee22e 100644 --- a/test/management/self-service-profiles.test.ts +++ b/test/management/self-service-profiles.test.ts @@ -1,5 +1,4 @@ import nock from 'nock'; -import { isEqual } from 'lodash-es'; const DOMAIN = `tenant.auth0.com`; const API_URL = `https://${DOMAIN}/api/v2`; @@ -74,7 +73,7 @@ describe('SelfServiceProfilesManager', () => { const createResult = await selfServiceProfileManager.postSelfServiceProfiles(requestBody); - expect(isEqual(createResult.data, nockedResponse)).toBe(true); + expect(createResult.data).toEqual(nockedResponse); }); }); @@ -115,7 +114,7 @@ describe('SelfServiceProfilesManager', () => { const getResult = await selfServiceProfileManager.getSelfServiceProfiles(); - expect(isEqual(getResult.data, nockedResponse)).toBe(true); + expect(getResult.data).toEqual(nockedResponse); expect(getResult.data.length).toBeGreaterThan(0); }); }); @@ -165,8 +164,7 @@ describe('SelfServiceProfilesManager', () => { const getResult = await selfServiceProfileManager.getSelfServiceProfilesById( requestParameters ); - - expect(isEqual(getResult.data, nockedResponse)).toBe(true); + expect(getResult.data).toEqual(nockedResponse); }); }); @@ -261,7 +259,7 @@ describe('SelfServiceProfilesManager', () => { requestBody ); - expect(isEqual(patchResult.data, nockedResponse)).toBe(true); + expect(patchResult.data).toEqual(nockedResponse); }); }); @@ -308,12 +306,9 @@ describe('SelfServiceProfilesManager', () => { .post(`/self-service-profiles/${requestParameters.id}/sso-ticket`) .reply(200, nockedResponse); - const patchResult = await selfServiceProfileManager.postSsoTicket( - requestParameters, - requestBody - ); + const result = await selfServiceProfileManager.postSsoTicket(requestParameters, requestBody); - expect(isEqual(patchResult.data, nockedResponse)).toBe(true); + expect(result.data).toEqual(nockedResponse); }); }); });