Skip to content

Commit

Permalink
Merge branch 'master' into feature/7517-clear-pointer-graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza authored Oct 18, 2021
2 parents de2efed + 12eb6c8 commit 4ab49b7
Show file tree
Hide file tree
Showing 21 changed files with 206 additions and 190 deletions.
19 changes: 0 additions & 19 deletions .github/stale.yml

This file was deleted.

12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"cors": "2.8.5",
"deepcopy": "2.1.0",
"express": "4.17.1",
"follow-redirects": "1.14.1",
"follow-redirects": "1.14.2",
"graphql": "15.6.0",
"graphql-list-fields": "2.0.2",
"graphql-relay": "0.9.0",
Expand All @@ -52,7 +52,7 @@
"pg-promise": "10.11.0",
"pluralize": "8.0.0",
"redis": "3.1.2",
"semver": "7.3.4",
"semver": "7.3.5",
"subscriptions-transport-ws": "0.10.0",
"tv4": "1.3.0",
"uuid": "8.3.2",
Expand Down
2 changes: 1 addition & 1 deletion spec/AuthenticationAdapters.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ describe('microsoft graph auth adapter', () => {
access_token: 'very.long.bad.token',
};
microsoft.validateAuthData(authData).then(done.fail, err => {
expect(err.code).toBe(101);
expect(err.code).toBe(Parse.Error.OBJECT_NOT_FOUND);
expect(err.message).toBe('Microsoft Graph auth is invalid for this user.');
done();
});
Expand Down
18 changes: 9 additions & 9 deletions spec/CloudCode.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('Cloud Code', () => {

it('is cleared cleared after the previous test', done => {
Parse.Cloud.run('hello', {}).catch(error => {
expect(error.code).toEqual(141);
expect(error.code).toEqual(Parse.Error.SCRIPT_FAILED);
done();
});
});
Expand Down Expand Up @@ -109,7 +109,7 @@ describe('Cloud Code', () => {
Parse.Cloud.run('cloudCodeWithError').then(
() => done.fail('should not succeed'),
e => {
expect(e).toEqual(new Parse.Error(141, 'foo is not defined'));
expect(e).toEqual(new Parse.Error(Parse.Error.SCRIPT_FAILED, 'foo is not defined'));
done();
}
);
Expand All @@ -123,7 +123,7 @@ describe('Cloud Code', () => {
Parse.Cloud.run('cloudCodeWithError').then(
() => done.fail('should not succeed'),
e => {
expect(e.code).toEqual(141);
expect(e.code).toEqual(Parse.Error.SCRIPT_FAILED);
expect(e.message).toEqual('Script failed.');
done();
}
Expand All @@ -142,7 +142,7 @@ describe('Cloud Code', () => {
const query = new Parse.Query('beforeFind');
await query.first();
} catch (e) {
expect(e.code).toBe(141);
expect(e.code).toBe(Parse.Error.SCRIPT_FAILED);
expect(e.message).toBe('throw beforeFind');
done();
}
Expand Down Expand Up @@ -467,7 +467,7 @@ describe('Cloud Code', () => {
});
} catch (e) {
catched = true;
expect(e.code).toBe(101);
expect(e.code).toBe(Parse.Error.OBJECT_NOT_FOUND);
}
expect(catched).toBe(true);
expect(called).toBe(7);
Expand All @@ -479,7 +479,7 @@ describe('Cloud Code', () => {
});
} catch (e) {
catched = true;
expect(e.code).toBe(101);
expect(e.code).toBe(Parse.Error.OBJECT_NOT_FOUND);
}
expect(catched).toBe(true);
expect(called).toBe(7);
Expand All @@ -491,7 +491,7 @@ describe('Cloud Code', () => {
});
} catch (e) {
catched = true;
expect(e.code).toBe(101);
expect(e.code).toBe(Parse.Error.OBJECT_NOT_FOUND);
}
expect(catched).toBe(true);
expect(called).toBe(7);
Expand Down Expand Up @@ -1761,7 +1761,7 @@ describe('Cloud Code', () => {

it('should set the failure message on the job error', async () => {
Parse.Cloud.job('myJobError', () => {
throw new Parse.Error(101, 'Something went wrong');
throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Something went wrong');
});
const job = await Parse.Cloud.startJob('myJobError');
let jobStatus, status;
Expand Down Expand Up @@ -2038,7 +2038,7 @@ describe('beforeFind hooks', () => {
done();
},
err => {
expect(err.code).toBe(141);
expect(err.code).toBe(Parse.Error.SCRIPT_FAILED);
expect(err.message).toEqual('Do not run that query');
done();
}
Expand Down
6 changes: 4 additions & 2 deletions spec/CloudCodeLogger.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe('Cloud Code Logger', () => {
expect(log[0]).toEqual('error');
const error = log[2].error;
expect(error instanceof Parse.Error).toBeTruthy();
expect(error.code).toBe(141);
expect(error.code).toBe(Parse.Error.SCRIPT_FAILED);
expect(error.message).toBe('uh oh!');
done();
});
Expand Down Expand Up @@ -199,7 +199,9 @@ describe('Cloud Code Logger', () => {
expect(log[1]).toMatch(
/Failed running cloud function aFunction for user [^ ]* with:\n {2}Input: {"foo":"bar"}\n {2}Error:/
);
const errorString = JSON.stringify(new Parse.Error(141, 'it failed!'));
const errorString = JSON.stringify(
new Parse.Error(Parse.Error.SCRIPT_FAILED, 'it failed!')
);
expect(log[1].indexOf(errorString)).toBeGreaterThan(0);
done();
})
Expand Down
4 changes: 2 additions & 2 deletions spec/ParseAPI.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const headers = {
'X-Parse-Installation-Id': 'yolo',
};

describe_only_db('mongo')('miscellaneous', () => {
describe('miscellaneous', () => {
it('db contains document after successful save', async () => {
const obj = new Parse.Object('TestObject');
obj.set('foo', 'bar');
Expand Down Expand Up @@ -1015,7 +1015,7 @@ describe('miscellaneous', function () {
done();
},
e => {
expect(e.code).toEqual(141);
expect(e.code).toEqual(Parse.Error.SCRIPT_FAILED);
expect(e.message).toEqual('noway');
done();
}
Expand Down
Loading

0 comments on commit 4ab49b7

Please sign in to comment.