From d1c492a0fa9a81ab028d23da97cc2e5c52298db9 Mon Sep 17 00:00:00 2001 From: Alexandre Bodin Date: Thu, 18 Jun 2020 11:36:28 +0200 Subject: [PATCH] Fix unit tests Signed-off-by: Alexandre Bodin --- packages/strapi-admin/services/__tests__/user.test.js | 8 ++++---- .../strapi-plugin-upload/test/__tests__/bootstrap.test.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/strapi-admin/services/__tests__/user.test.js b/packages/strapi-admin/services/__tests__/user.test.js index d8de4bc3f6..137b8d168a 100644 --- a/packages/strapi-admin/services/__tests__/user.test.js +++ b/packages/strapi-admin/services/__tests__/user.test.js @@ -49,7 +49,7 @@ describe('User', () => { expect(create).toHaveBeenCalled(); expect(createToken).toHaveBeenCalled(); - expect(result).toStrictEqual(expected); + expect(result).toMatchObject(expected); }); test('Creates a user and hash password if provided', async () => { @@ -88,7 +88,7 @@ describe('User', () => { expect(create).toHaveBeenCalled(); expect(hashPassword).toHaveBeenCalledWith(input.password); expect(createToken).toHaveBeenCalled(); - expect(result).toStrictEqual(expected); + expect(result).toMatchObject(expected); expect(result.password !== input.password).toBe(true); }); @@ -120,7 +120,7 @@ describe('User', () => { const expected = _.clone(input); const result = await userService.create(input); - expect(result).toStrictEqual(expected); + expect(result).toMatchObject(expected); }); }); @@ -289,7 +289,7 @@ describe('User', () => { const res = await userService.findOne(input); expect(res).not.toBeNull(); - expect(res).toStrictEqual(user); + expect(res).toMatchObject(user); }); test('Fails to find a user with provided params', async () => { diff --git a/packages/strapi-plugin-upload/test/__tests__/bootstrap.test.js b/packages/strapi-plugin-upload/test/__tests__/bootstrap.test.js index 4188dcb5c6..ac6de6de52 100644 --- a/packages/strapi-plugin-upload/test/__tests__/bootstrap.test.js +++ b/packages/strapi-plugin-upload/test/__tests__/bootstrap.test.js @@ -7,7 +7,7 @@ describe('Upload plugin bootstrap function', () => { global.strapi = { admin: { - services: { permission: { provider: { register } } }, + services: { permission: { actionProvider: { register } } }, }, log: { error() {},