diff --git a/spec/ParseAPI.spec.js b/spec/ParseAPI.spec.js index 662e28ed..c75d2ce3 100644 --- a/spec/ParseAPI.spec.js +++ b/spec/ParseAPI.spec.js @@ -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(); + }); + }); + });