I'm new to Jasmine, and am getting this error:
Expected spy unknown to have been called.
What does this mean? I'm spying on a method, but am not sure what unknown
means.
The answer is really simple! The spy didnt have a name, so it's called "unknown" by default.
To name it, I simply did this
var mySpy = jasmine.createSpy("JamesBond");
Then it failed with something more readable!
Expected spy JamesBond to have been called.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With