Skip to content

Commit b395f15

Browse files
committed
Remove usage of expectAsync
1 parent 8d7cb6d commit b395f15

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

spec/.eslintrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
"range": true,
2424
"jequal": true,
2525
"create": true,
26-
"arrayContains": true,
27-
"expectAsync": true
26+
"arrayContains": true
2827
},
2928
"rules": {
3029
"no-console": [0],

spec/ParseUser.spec.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3793,7 +3793,13 @@ describe('2FA', () => {
37933793
} = await enable2FA(user);
37943794
const token = otplib.authenticator.generate(secret);
37953795
await validate2FA(user, token);
3796-
// await Parse.User.logOut();
3797-
await expectAsync(Parse.User.logIn('username', 'password')).toBeRejected();
3796+
await Parse.User.logOut();
3797+
await Parse.User.logIn('username', 'password')
3798+
.then(() => {
3799+
throw 'Login should have failed';
3800+
})
3801+
.catch(() => {
3802+
/**/
3803+
});
37983804
});
37993805
});

0 commit comments

Comments
 (0)