Jasmine 20 Andreturn
A spy can stub any function and tracks calls to it and all arguments.
Jasmine 20 andreturn. A spy only exists in the describe or it block in which it is defined and will be removed after each spec. An expectation in jasmine is an assertion that can be either true or false. Jasmine has test double functions called spies. This is great but maintaining a list of.
The jasminecreatespyobj method can be called with a list of names and returns an object which consists only of spies of the given names. A spec contains one or more expectations that test the state of the code under test. Its jasmine 13 and 20 compatible and also has some additional examplestricks. It seems that when i pulled down jasmine.
The string is a title for this spec and the function is the spec or test. This is the current 200 jasmine syntax david tengdin apr 7 14 at 1418 2 i made a jasmine test where i show this kind of mock. I received version 20 of the library and this function andreturn has been refactored and the new syntax is andreturnsomething by the way thanks for a great book so far. Andreturn seems to be working.
This syntax has changed for jasmine 20.