From 024d4bd25cc59c6f0ac76116132f33f477685220 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Fri, 22 Jul 2022 18:32:13 +0800 Subject: [PATCH] stop referring to user entity before migration --- packages/api/test/routers/auth.test.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/api/test/routers/auth.test.ts b/packages/api/test/routers/auth.test.ts index 106eb2f68..ad12a3a35 100644 --- a/packages/api/test/routers/auth.test.ts +++ b/packages/api/test/routers/auth.test.ts @@ -186,14 +186,15 @@ describe('auth router', () => { }) context('when user is not confirmed', async () => { - const pendingUser = await createTestUser( - 'pending_user', - undefined, - correctPassword, - true - ) + let pendingUser: User before(async () => { + pendingUser = await createTestUser( + 'pending_user', + undefined, + correctPassword, + true + ) email = pendingUser.email password = correctPassword }) @@ -231,9 +232,10 @@ describe('auth router', () => { }) context('when user has no password stored in db', async () => { - const socialAccountUser = await createTestUser('social_account_user') + let socialAccountUser: User - before(() => { + before(async () => { + socialAccountUser = await createTestUser('social_account_user') email = socialAccountUser.email password = 'Some password' })