File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
packages/auth/src/mfa/assertions Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ import { AuthErrorCode } from '../../core/errors';
38
38
import { AppName } from '../../model/auth' ;
39
39
import { _castAuth } from '../../core/auth/auth_impl' ;
40
40
import { MultiFactorAssertionImpl } from '../mfa_assertion' ;
41
- import { FirebaseError } from '@firebase/util' ;
42
41
43
42
use ( chaiAsPromised ) ;
44
43
@@ -268,12 +267,9 @@ describe('Testing signin Flow', () => {
268
267
'123456'
269
268
) as any ;
270
269
271
- try {
272
- _response = await assertion . _process ( auth , session ) ;
273
- } catch ( e ) {
274
- expect ( e ) . to . be . an . instanceOf ( FirebaseError ) ;
275
- expect ( e . message ) . to . eql ( 'Firebase: Error (auth/argument-error).' ) ;
276
- }
270
+ await expect ( assertion . _process ( auth , session ) ) . to . be . rejectedWith (
271
+ 'auth/argument-error'
272
+ ) ;
277
273
} ) ;
278
274
279
275
it ( 'should throw Firebase Error if otp is undefined' , async ( ) => {
@@ -288,12 +284,9 @@ describe('Testing signin Flow', () => {
288
284
undefined as any
289
285
) as any ;
290
286
291
- try {
292
- _response = await assertion . _process ( auth , session ) ;
293
- } catch ( e ) {
294
- expect ( e ) . to . be . an . instanceOf ( FirebaseError ) ;
295
- expect ( e . message ) . to . eql ( 'Firebase: Error (auth/argument-error).' ) ;
296
- }
287
+ await expect ( assertion . _process ( auth , session ) ) . to . be . rejectedWith (
288
+ 'auth/argument-error'
289
+ ) ;
297
290
} ) ;
298
291
} ) ;
299
292
You can’t perform that action at this time.
0 commit comments