You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we're in an AMD environment, wouldn't it make sense to just install the plugin rather than return it? In other words, is there a use case where we require 'chai-jquery' but don't want it installed by default?
I would have expected this:
diff --git a/chai-jquery.js b/chai-jquery.js
index f29f2b1..aa8f693 100644
--- a/chai-jquery.js+++ b/chai-jquery.js@@ -5,10 +5,10 @@
module.exports = chaiJquery;
} else if (typeof define === "function" && define.amd) {
// AMD
- define(['jquery'], function ($) {- return function (chai, utils) {+ define(['jquery','chai'], function ($,chai) {+ chai.use(function (chai, utils) {
return chaiJquery(chai, utils, $);
- };+ });
});
} else {
// Other environment (usually <script> tag): plug in to global chai instanc
The text was updated successfully, but these errors were encountered:
If we're in an AMD environment, wouldn't it make sense to just install the plugin rather than return it? In other words, is there a use case where we require 'chai-jquery' but don't want it installed by default?
I would have expected this:
The text was updated successfully, but these errors were encountered: