50
rated 0 times
[
55]
[
5]
/ answers: 1 / hits: 111692
/ 12 Years ago, fri, november 30, 2012, 12:00:00
According to the Jasmine documentation, a mock can be created like this:
jasmine.createSpyObj(someObject, ['method1', 'method2', ... ]);
How do you stub one of these methods? For example, if you want to test what happens when a method throws an exception, how would you do that?
More From » jasmine