Skip to content

Commit 0e86783

Browse files
author
Vladyslav Chygrinov
committed
Console logs removal, renamed test, added {} to if
1 parent f51db6c commit 0e86783

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

spec/PublicAPI.spec.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const request = function(url, callback) {
77
};
88

99
describe('public API', () => {
10-
it('should return ajax response on ajax request', done => {
10+
it('should return missing username error on ajax request without username provided', done => {
1111
reconfigureServer({
1212
publicServerURL: 'http://localhost:8378/1',
1313
})
@@ -47,7 +47,6 @@ describe('public API', () => {
4747
});
4848
})
4949
.catch(error => {
50-
console.log('ERROR IN TEST: ', error);
5150
expect(error.status).not.toBe(302);
5251
expect(error.text).toEqual('{"code":-1,"error":"Missing token"}');
5352
done();
@@ -71,7 +70,6 @@ describe('public API', () => {
7170
});
7271
})
7372
.catch(error => {
74-
console.log('ERROR IN TEST: ', error);
7573
expect(error.status).not.toBe(302);
7674
expect(error.text).toEqual('{"code":201,"error":"Missing password"}');
7775
done();

spec/ValidationAndPasswordsReset.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,6 @@ describe('Custom Pages, Email Verification, Password Reset', () => {
939939
},
940940
followRedirects: false,
941941
}).then(response => {
942-
console.log('REQUEST RESPONSE');
943942
expect(response.status).toEqual(200);
944943
expect(response.text).toEqual('"Password successfully reset"');
945944

src/Routers/PublicAPIRouter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,9 @@ export class PublicAPIRouter extends PromiseRouter {
210210
if (
211211
result.err ===
212212
'Password does not meet the Password Policy requirements.'
213-
)
213+
) {
214214
throw new Parse.Error(Parse.Error.OTHER_CAUSE, `${result.err}`);
215+
}
215216
throw new Parse.Error(
216217
Parse.Error.OTHER_CAUSE,
217218
'Failed to reset password (Username/email or token is invalid)'

0 commit comments

Comments
 (0)