Added test for proper handling of trying to call a non-existing Cloud Function
This commit is contained in:
@@ -648,4 +648,15 @@ describe('miscellaneous', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('fails on invalid function', done => {
|
||||||
|
Parse.Cloud.run('somethingThatDoesDefinitelyNotExist').then((s) => {
|
||||||
|
fail('This should have never suceeded');
|
||||||
|
done();
|
||||||
|
}, (e) => {
|
||||||
|
expect(e.code).toEqual(Parse.Error.SCRIPT_FAILED);
|
||||||
|
expect(e.message).toEqual('Invalid function.');
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user