File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
packages/auth/src/mfa/assertions Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -268,12 +268,9 @@ describe('Testing signin Flow', () => {
268
268
'123456'
269
269
) as any ;
270
270
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
- }
271
+ await expect ( assertion . _process ( auth , session ) ) . to . be . rejectedWith (
272
+ 'auth/argument-error'
273
+ ) ;
277
274
} ) ;
278
275
279
276
it ( 'should throw Firebase Error if otp is undefined' , async ( ) => {
@@ -288,12 +285,9 @@ describe('Testing signin Flow', () => {
288
285
undefined as any
289
286
) as any ;
290
287
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
- }
288
+ await expect ( assertion . _process ( auth , session ) ) . to . be . rejectedWith (
289
+ 'auth/argument-error'
290
+ ) ;
297
291
} ) ;
298
292
} ) ;
299
293
You can’t perform that action at this time.
0 commit comments