Skip to content

Commit 6dee8bf

Browse files
committed
fix: feedbacks
1 parent 2cccdc4 commit 6dee8bf

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

spec/CloudCode.spec.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4658,7 +4658,7 @@ describe('sendEmail', () => {
46584658
});
46594659

46604660
describe('beforePasswordResetRequest hook', () => {
4661-
it('should run beforePasswordResetRequest with valid user', async done => {
4661+
it('should run beforePasswordResetRequest with valid user', async () => {
46624662
let hit = 0;
46634663
let sendPasswordResetEmailCalled = false;
46644664
const emailAdapter = {
@@ -4691,10 +4691,9 @@ describe('beforePasswordResetRequest hook', () => {
46914691
await Parse.User.requestPasswordReset('test@parse.com');
46924692
expect(hit).toBe(1);
46934693
expect(sendPasswordResetEmailCalled).toBe(true);
4694-
done();
46954694
});
46964695

4697-
it('should be able to block password reset request if an error is thrown', async done => {
4696+
it('should be able to block password reset request if an error is thrown', async () => {
46984697
let hit = 0;
46994698
let sendPasswordResetEmailCalled = false;
47004699
const emailAdapter = {
@@ -4733,10 +4732,9 @@ describe('beforePasswordResetRequest hook', () => {
47334732
}
47344733
expect(hit).toBe(1);
47354734
expect(sendPasswordResetEmailCalled).toBe(false);
4736-
done();
47374735
});
47384736

4739-
it('should be able to block password reset request if an error is thrown even if the user has an attached file', async done => {
4737+
it('should be able to block password reset request if an error is thrown even if the user has an attached file', async () => {
47404738
let hit = 0;
47414739
let sendPasswordResetEmailCalled = false;
47424740
const emailAdapter = {
@@ -4778,10 +4776,9 @@ describe('beforePasswordResetRequest hook', () => {
47784776
}
47794777
expect(hit).toBe(1);
47804778
expect(sendPasswordResetEmailCalled).toBe(false);
4781-
done();
47824779
});
47834780

4784-
it('should not run beforePasswordResetRequest if email does not exist', async done => {
4781+
it('should not run beforePasswordResetRequest if email does not exist', async () => {
47854782
let hit = 0;
47864783
const emailAdapter = {
47874784
sendVerificationEmail: () => Promise.resolve(),
@@ -4804,10 +4801,9 @@ describe('beforePasswordResetRequest hook', () => {
48044801
// May or may not throw depending on passwordPolicy.resetPasswordSuccessOnInvalidEmail
48054802
}
48064803
expect(hit).toBe(0);
4807-
done();
48084804
});
48094805

4810-
it('should have expected data in request in beforePasswordResetRequest', async done => {
4806+
it('should have expected data in request in beforePasswordResetRequest', async () => {
48114807
const emailAdapter = {
48124808
sendVerificationEmail: () => Promise.resolve(),
48134809
sendPasswordResetEmail: () => {},
@@ -4836,7 +4832,6 @@ describe('beforePasswordResetRequest hook', () => {
48364832
user.set('email', 'test2@parse.com');
48374833
await user.signUp();
48384834
await Parse.User.requestPasswordReset('test2@parse.com');
4839-
done();
48404835
});
48414836

48424837
it('should validate that only _User class is allowed for beforePasswordResetRequest', () => {

0 commit comments

Comments
 (0)