@@ -19,18 +19,16 @@ import { expect, use } from 'chai';
19
19
import * as chaiAsPromised from 'chai-as-promised' ;
20
20
import * as sinon from 'sinon' ;
21
21
22
- import { OperationType , ProviderId } from '@firebase/auth-types-exp' ;
22
+ import { FactorId , OperationType , ProviderId } from '@firebase/auth-types-exp' ;
23
23
import { FirebaseError } from '@firebase/util' ;
24
24
25
25
import { mockEndpoint } from '../../test/helpers/api/helper' ;
26
26
import { testAuth , testUser , TestAuth } from '../../test/helpers/mock_auth' ;
27
27
import * as mockFetch from '../../test/helpers/mock_fetch' ;
28
28
import { Endpoint } from '../api' ;
29
29
import { APIUserInfo } from '../api/account_management/account' ;
30
- import { AuthCredential } from '../core/credentials' ;
31
30
import { PhoneAuthCredential } from '../core/credentials/phone' ;
32
31
import { AuthErrorCode } from '../core/errors' ;
33
- import { EmailAuthProvider } from '../core/providers/email' ;
34
32
import { User , UserCredential } from '../model/user' ;
35
33
import { MultiFactorAssertion } from './mfa_assertion' ;
36
34
import { PhoneMultiFactorAssertion } from '../platform_browser/mfa/assertions/phone' ;
@@ -45,17 +43,12 @@ describe('core/mfa/mfa_resolver/MultiFactorResolver', () => {
45
43
let auth : TestAuth ;
46
44
let underlyingError : FirebaseError ;
47
45
let error : MultiFactorError ;
48
- let primaryFactorCredential : AuthCredential ;
49
46
let clock : sinon . SinonFakeTimers ;
50
47
51
48
beforeEach ( async ( ) => {
52
49
clock = sinon . useFakeTimers ( ) ;
53
50
auth = await testAuth ( ) ;
54
51
auth . tenantId = 'tenant-id' ;
55
- primaryFactorCredential = EmailAuthProvider . credential (
56
- 'email' ,
57
- 'password'
58
- ) as AuthCredential ;
59
52
underlyingError = _createError ( auth , AuthErrorCode . MFA_REQUIRED , {
60
53
serverResponse : {
61
54
localId : 'local-id' ,
@@ -233,7 +226,7 @@ describe('core/mfa/mfa_resolver/MultiFactorResolver', () => {
233
226
234
227
it ( 'can be used to obtain a resolver' , ( ) => {
235
228
const resolver = getMultiFactorResolver ( auth , error ) ;
236
- expect ( resolver . hints [ 0 ] . factorId ) . to . eq ( ProviderId . PHONE ) ;
229
+ expect ( resolver . hints [ 0 ] . factorId ) . to . eq ( FactorId . PHONE ) ;
237
230
} ) ;
238
231
} ) ;
239
232
} ) ;
0 commit comments