Skip to content

Commit 73638fe

Browse files
committed
fixing unit tests
1 parent e5ef6c3 commit 73638fe

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

packages/auth/src/platform_browser/strategies/phone.test.ts

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import {
4444
updatePhoneNumber
4545
} from './phone';
4646

47-
import { ConfirmationResult, UserCredential } from '@firebase/auth-types';
47+
import { ConfirmationResult } from '@firebase/auth-types';
4848

4949
interface OTPCredential extends Credential {
5050
code?: string;
@@ -135,20 +135,6 @@ describe('platform_browser/strategies/phone', () => {
135135
});
136136

137137
it('fail with webOTP not supported error when webOTP autofill is used in sign in flow', async () => {
138-
const idTokenResponse: IdTokenResponse = {
139-
idToken: 'my-id-token',
140-
refreshToken: 'my-refresh-token',
141-
expiresIn: '1234',
142-
localId: 'uid',
143-
kind: IdTokenResponseKind.CreateAuthUri
144-
};
145-
146-
// This endpoint is called from within the callback, in
147-
// signInWithCredential
148-
const signInEndpoint = mockEndpoint(
149-
Endpoint.SIGN_IN_WITH_PHONE_NUMBER,
150-
idTokenResponse
151-
);
152138
mockEndpoint(Endpoint.GET_ACCOUNT_INFO, {
153139
users: [{ localId: 'uid' }]
154140
});
@@ -162,8 +148,8 @@ describe('platform_browser/strategies/phone', () => {
162148
return Promise.resolve(otpCred);
163149
});
164150

165-
expect(
166-
await signInWithPhoneNumber(auth, 'number', verifier, true)
151+
await expect(
152+
signInWithPhoneNumber(auth, 'number', verifier, true)
167153
).to.be.rejectedWith(FirebaseError, 'auth/web-otp-not-supported');
168154
});
169155
});

0 commit comments

Comments
 (0)