Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brianmriley/3515aad8036377629dbe22c6bd2c2cd4 to your computer and use it in GitHub Desktop.
Save brianmriley/3515aad8036377629dbe22c6bd2c2cd4 to your computer and use it in GitHub Desktop.
describe("Foo constructor", function() {
it("should call its `bar()` instance method.", function() {
spyOn(Foo.prototype, 'bar');
var foo = new Foo();
expect(Foo.prototype.bar).toHaveBeenCalled();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment