@@ -24,15 +24,13 @@ import { Operation, ProviderId } from '@firebase/auth-types-exp';
24
24
import { FirebaseError , isNode } from '@firebase/util' ;
25
25
26
26
import { mockEndpoint } from '../../../test/helpers/api/helper' ;
27
- import { testAuth , testUser , TestAuth } from '../../../test/helpers/mock_auth' ;
27
+ import { testAuth , TestAuth , testUser } from '../../../test/helpers/mock_auth' ;
28
28
import * as mockFetch from '../../../test/helpers/mock_fetch' ;
29
29
import { Endpoint } from '../../api' ;
30
30
import { ServerError } from '../../api/errors' ;
31
31
import { User } from '../../model/user' ;
32
32
import {
33
- fetchSignInMethodsForEmail ,
34
- sendEmailVerification ,
35
- verifyBeforeUpdateEmail
33
+ fetchSignInMethodsForEmail , sendEmailVerification , verifyBeforeUpdateEmail
36
34
} from './email' ;
37
35
38
36
use ( chaiAsPromised ) ;
@@ -72,10 +70,10 @@ describe('core/strategies/fetchSignInMethodsForEmail', () => {
72
70
} ) ;
73
71
const response = await fetchSignInMethodsForEmail ( auth , email ) ;
74
72
expect ( response ) . to . eql ( expectedSignInMethods ) ;
75
- expect ( mock . calls [ 0 ] . request ) . to . eql ( {
76
- identifier : email ,
77
- continueUri : 'http://localhost:8089/context.html'
78
- } ) ;
73
+ const request = mock . calls [ 0 ] . request as Record < string , string > ;
74
+ expect ( request [ ' identifier' ] ) . to . eq ( email ) ;
75
+ // We can't rely on a fixed port number
76
+ expect ( request [ 'continueUri' ] ) . to . match ( / h t t p : \/ \/ l o c a l h o s t : [ 0 - 9 ] + \/ c o n t e x t \. h t m l / ) ;
79
77
} ) ;
80
78
}
81
79
0 commit comments