diff --git a/api/setup-jest.ts b/api/setup-jest.ts index 49932be6..205f4b49 100644 --- a/api/setup-jest.ts +++ b/api/setup-jest.ts @@ -1,8 +1,5 @@ import initializeDb from './src/lib/db' beforeAll(async () => { - // avoid conflict in dev container - process.env.NODE_ENV = 'test'; - await initializeDb() }) diff --git a/api/src/services/users/users.test.ts b/api/src/services/users/users.test.ts index 98432872..e5848ceb 100644 --- a/api/src/services/users/users.test.ts +++ b/api/src/services/users/users.test.ts @@ -284,8 +284,8 @@ describe('user writes', () => { }) expect(result.passageId).toEqual('new-id-1') - expect(mockPassageUser.create).to.haveBeenCalled() - expect(mockPassageUser.activate).to.haveBeenCalled() + expect(mockPassageUser.create).toHaveBeenCalled() + expect(mockPassageUser.activate).toHaveBeenCalled() }) scenario( @@ -353,11 +353,8 @@ describe('user writes', () => { email: scenario.user.one.email, roles: ['USDR_ADMIN'], }) - await deleteUser({ - id: scenario.user.one.id, - })) -expect(mockPassageUser.delete).toHaveBeenCalledWith(scenario.user.one.passageId) - + await deleteUser({ id: scenario.user.one.id }) + expect(mockPassageUser.delete).toHaveBeenCalledWith(scenario.user.one.passageId) }) }) })