Be the first user to complete this post

  • 0
Add to List

How to return a value from a jasmine spy

Returning a value from your jasmine spy is extremely simple. Just do the following

jasmine.createSpy().and.returnValue(value);



Also Read:

  1. Automated testing of webcam / video feeds in webRTC application
  2. Run a single test in jasmine
  3. Testing promise sequence using mocha, chai, chai-as-promised, sinon