Skip to content

Commit

Permalink
Fix execution of browserified mocha-sinon
Browse files Browse the repository at this point in the history
Removed a (window === undefined) check from the loading logic so that require is called correctly when browserified

Fixes #7
  • Loading branch information
MarshallOfSound committed Jan 7, 2016
1 parent 9826799 commit a7f32c0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mocha-sinon.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function mochaSinon(sinon){
&& typeof window.sinon === "object"
) {
plugin(window.sinon);
} else if (typeof require === "function" && typeof window === 'undefined') {
} else if (typeof require === "function") {
var sinon = require('sinon');

module.exports = function () {
Expand All @@ -45,9 +45,8 @@ function mochaSinon(sinon){

plugin(sinon);
} else {
throw "This module loading schema is unsupported. Pull requests are welcome!";
throw "We could not find sinon through a supported module loading technique. Pull requests are welcome!";
}
})(mochaSinon);

})();

0 comments on commit a7f32c0

Please sign in to comment.