Skip to content

Commit d8525e9

Browse files
committed
fix : Unexpected token '}' 2057
1 parent 55c3b3b commit d8525e9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

spec/CloudCode.spec.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ describe('Cloud Code', () => {
258258
expect(newObj).toBeUndefined();
259259
});
260260

261+
it('beforeSave rejection with custom error code', function (done) {
262+
Parse.Cloud.beforeSave('BeforeSaveFailWithErrorCode', function () {
263+
throw new Parse.Error(999, 'Nope');
264+
});
265+
261266
const obj = new Parse.Object('BeforeSaveFailWithErrorCode');
262267
obj.set('foo', 'bar');
263268
obj.save().then(
@@ -1547,9 +1552,9 @@ describe('Cloud Code', () => {
15471552
});
15481553

15491554
/*
1550-
TODO: fix for Postgres
1551-
trying to delete a field that doesn't exists doesn't play nice
1552-
*/
1555+
TODO: fix for Postgres
1556+
trying to delete a field that doesn't exists doesn't play nice
1557+
*/
15531558
it_exclude_dbs(['postgres'])(
15541559
'should fully delete objects when using `unset` and `set` with beforeSave (regression test for #1840)',
15551560
done => {
@@ -2055,7 +2060,6 @@ describe('Cloud Code', () => {
20552060
}
20562061
});
20572062
});
2058-
20592063
describe('cloud functions', () => {
20602064
it('Should have request ip', done => {
20612065
Parse.Cloud.define('myFunction', req => {

0 commit comments

Comments
 (0)