refactor: replace hardcoded error codes with references (#7546)

This commit is contained in:
dblythy
2021-10-19 05:19:47 +11:00
committed by GitHub
parent b5fc0d59db
commit 12eb6c823b
13 changed files with 85 additions and 52 deletions

View File

@@ -147,7 +147,7 @@ describe('Regex Vulnerabilities', function () {
await Parse.User.logIn('someemail@somedomain.com', 'newpassword');
fail('should not work');
} catch (e) {
expect(e.code).toEqual(101);
expect(e.code).toEqual(Parse.Error.OBJECT_NOT_FOUND);
expect(e.message).toEqual('Invalid username/password.');
}
});