Hello,
I’m building a spec to verify that a required parameter will throw an exception if it is not passed in. I’m using the toThrow matcher but it does not seem to match the exception being thrown.
Am I using toThow all wrong? Here’s the two examples I have tried matching against:
it("requires content for update", function(){ expect(myObj.updateMyData()).toThrow('Application', 'The MYPARAM parameter to the updateMyData function is required but was not passed in.'); })
And
it("requires content for update", function(){ expect(myObj.updateMyData()).toThrow(); })
Any help is appreciated!
BTW, thanks for building this. I’ve been looking for an active BDD framework for CF. I’m really glad I found this. Cheers!
Matt