@@ -33,7 +33,10 @@ describe('signUp', () => {
33
33
afterEach ( mockFetch . tearDown ) ;
34
34
35
35
it ( 'should POST to the correct endpoint' , async ( ) => {
36
- const mock = mockEndpoint ( Endpoint . SIGN_UP , { displayName :
'my-name' , email :
'[email protected] ' } ) ;
36
+ const mock = mockEndpoint ( Endpoint . SIGN_UP , {
37
+ displayName : 'my-name' ,
38
+
39
+ } ) ;
37
40
38
41
const response = await signUp ( mockAuth , request ) ;
39
42
expect ( response . displayName ) . to . eq ( 'my-name' ) ;
@@ -44,26 +47,32 @@ describe('signUp', () => {
44
47
} ) ;
45
48
46
49
it ( 'should handle errors' , async ( ) => {
47
- const mock = mockEndpoint ( Endpoint . SIGN_UP , {
48
- error : {
49
- code : 400 ,
50
- message : ServerError . EMAIL_EXISTS ,
51
- errors : [
52
- {
53
- message : ServerError . EMAIL_EXISTS ,
54
- }
55
- ]
56
- }
57
- } , 400 ) ;
50
+ const mock = mockEndpoint (
51
+ Endpoint . SIGN_UP ,
52
+ {
53
+ error : {
54
+ code : 400 ,
55
+ message : ServerError . EMAIL_EXISTS ,
56
+ errors : [
57
+ {
58
+ message : ServerError . EMAIL_EXISTS
59
+ }
60
+ ]
61
+ }
62
+ } ,
63
+ 400
64
+ ) ;
58
65
59
66
try {
60
67
await signUp ( mockAuth , request ) ;
61
68
} catch ( e ) {
62
69
expect ( e . name ) . to . eq ( 'FirebaseError' ) ;
63
- expect ( e . message ) . to . eq ( 'Firebase: The email address is already in use by another account. (auth/email-already-in-use).' ) ;
70
+ expect ( e . message ) . to . eq (
71
+ 'Firebase: The email address is already in use by another account. (auth/email-already-in-use).'
72
+ ) ;
64
73
expect ( mock . calls [ 0 ] ) . to . eql ( {
65
74
request
66
75
} ) ;
67
76
}
68
77
} ) ;
69
- } ) ;
78
+ } ) ;
0 commit comments