@@ -9,7 +9,7 @@ test("e2e", async (ctx: TestContext) => {
99 const { user } = await ctx . modules . users . create ( { } ) ;
1010
1111 const { token : session } = await ctx . modules . users . createToken ( {
12- userId : user . id
12+ userId : user . id ,
1313 } ) ;
1414
1515 const fakeEmail = faker . internet . email ( ) ;
@@ -18,15 +18,16 @@ test("e2e", async (ctx: TestContext) => {
1818 {
1919 const authRes = await ctx . modules . auth . sendEmailVerification ( {
2020 email : fakeEmail ,
21- userToken : session . token
21+ userToken : session . token ,
2222 } ) ;
2323
2424 // Look up correct code
25- const { code } = await ctx . db . emailPasswordlessVerification . findFirstOrThrow ( {
26- where : {
27- id : authRes . verification . id ,
28- } ,
29- } ) ;
25+ const { code } = await ctx . db . emailPasswordlessVerification
26+ . findFirstOrThrow ( {
27+ where : {
28+ id : authRes . verification . id ,
29+ } ,
30+ } ) ;
3031
3132 // Now by verifying the email, we register, and can also use
3233 // this to verify the token
@@ -37,10 +38,9 @@ test("e2e", async (ctx: TestContext) => {
3738
3839 assertEquals ( verifyRes . token . type , "user" ) ;
3940
40-
4141 // Make sure we end up with the same user we started with
4242 const verifyRes2 = await ctx . modules . users . authenticateToken ( {
43- userToken : verifyRes . token . token
43+ userToken : verifyRes . token . token ,
4444 } ) ;
4545
4646 assertEquals ( verifyRes2 . userId , user . id ) ;
@@ -50,26 +50,26 @@ test("e2e", async (ctx: TestContext) => {
5050 // but without a token, expecting the same user
5151 {
5252 const authRes = await ctx . modules . auth . sendEmailVerification ( {
53- email : fakeEmail
53+ email : fakeEmail ,
5454 } ) ;
5555
5656 // Look up correct code
57- const { code : code } = await ctx . db . emailPasswordlessVerification . findFirstOrThrow ( {
58- where : {
59- id : authRes . verification . id ,
60- } ,
61- } ) ;
57+ const { code : code } = await ctx . db . emailPasswordlessVerification
58+ . findFirstOrThrow ( {
59+ where : {
60+ id : authRes . verification . id ,
61+ } ,
62+ } ) ;
6263
6364 const verifyRes = await ctx . modules . auth . completeEmailVerification ( {
6465 verificationId : authRes . verification . id ,
6566 code : code ,
6667 } ) ;
6768
6869 const verifyRes2 = await ctx . modules . users . authenticateToken ( {
69- userToken : verifyRes . token . token
70+ userToken : verifyRes . token . token ,
7071 } ) ;
7172
72- assertEquals ( verifyRes2 . userId , user . id ) ;
73+ assertEquals ( verifyRes2 . userId , user . id ) ;
7374 }
7475} ) ;
75-
0 commit comments