diff --git a/chai-jquery.js b/chai-jquery.js index 782aef5..1684e7b 100644 --- a/chai-jquery.js +++ b/chai-jquery.js @@ -2,7 +2,9 @@ // Module systems magic dance. if (typeof require === "function" && typeof exports === "object" && typeof module === "object") { // NodeJS - module.exports = chaiJquery; + module.exports = function (chai, utils) { + return chaiJquery(chai, utils, require('jquery')); + }; } else if (typeof define === "function" && define.amd) { // AMD define(['jquery'], function ($) { @@ -19,7 +21,6 @@ }(function (chai, utils, $) { var inspect = utils.inspect, flag = utils.flag; - $ = $ || jQuery; var setPrototypeOf = '__proto__' in Object ? function (object, prototype) { diff --git a/package.json b/package.json index 1b5b79e..e6cefe1 100644 --- a/package.json +++ b/package.json @@ -23,5 +23,8 @@ "mocha": "1", "mocha-phantomjs": "3", "jquery": "2.1.0" + }, + "peerDependencies": { + "jquery": "*" } }