refactor: replace hardcoded error codes with references (#7546)
This commit is contained in:
@@ -464,7 +464,7 @@ describe('Hooks', () => {
|
||||
expect(err).not.toBe(undefined);
|
||||
expect(err).not.toBe(null);
|
||||
if (err) {
|
||||
expect(err.code).toBe(141);
|
||||
expect(err.code).toBe(Parse.Error.SCRIPT_FAILED);
|
||||
expect(err.message.code).toEqual(1337);
|
||||
expect(err.message.error).toEqual('hacking that one!');
|
||||
}
|
||||
@@ -536,7 +536,7 @@ describe('Hooks', () => {
|
||||
expect(err).not.toBe(undefined);
|
||||
expect(err).not.toBe(null);
|
||||
if (err) {
|
||||
expect(err.code).toBe(141);
|
||||
expect(err.code).toBe(Parse.Error.SCRIPT_FAILED);
|
||||
expect(err.message).toEqual('incorrect key provided');
|
||||
}
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user