Skip to content

Instantly share code, notes, and snippets.

@voronianski
Created March 3, 2013 20:55
Show Gist options
  • Save voronianski/5078252 to your computer and use it in GitHub Desktop.
Save voronianski/5078252 to your computer and use it in GitHub Desktop.
/*
Put on top of the file before describe statements
Usage:
expect(fn).toBeFunction()
*/
beforeEach(function (){
this.addMatchers({
toBeFunction: function (){
return Object.prototype.toString.call(this.actual)==='[object Function]';
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment