Skip to content

Instantly share code, notes, and snippets.

@gpeters-lv
Created August 26, 2013 14:29
Show Gist options
  • Save gpeters-lv/6342017 to your computer and use it in GitHub Desktop.
Save gpeters-lv/6342017 to your computer and use it in GitHub Desktop.
// Spy on a method, simplest form
spyOn(object, 'methodName');
// Create an object to act as a spy
var spyObject = jasmine.createSpyObj('spyObject', ['method1', 'method2');
// Create a stand alone spy
var spyMethod = jasmine.createSpy('spyMethod');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment