Skip to content

Instantly share code, notes, and snippets.

@emlun
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emlun/e7306ef16d92a9bca634 to your computer and use it in GitHub Desktop.
Save emlun/e7306ef16d92a9bca634 to your computer and use it in GitHub Desktop.
/*
Make sure Jasmine is included somehow, then declare a dependency on this module.
Usage:
expect(fn).toBeFunction()
*/
define([
'underscore',
], function(_) {
beforeEach(function() {
this.addMatchers({
toBeAFunction: function() {
return _.isFunction(this.actual);
},
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment