Skip to content

Instantly share code, notes, and snippets.

View gpeters-lv's full-sized avatar

Grant Caesar Peters gpeters-lv

View GitHub Profile
// 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');