Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions chai-jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ($) {
Expand All @@ -19,7 +21,6 @@
}(function (chai, utils, $) {
var inspect = utils.inspect,
flag = utils.flag;
$ = $ || jQuery;

var setPrototypeOf = '__proto__' in Object ?
function (object, prototype) {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@
"mocha": "1",
"mocha-phantomjs": "3",
"jquery": "2.1.0"
},
"peerDependencies": {
"jquery": "*"
}
}