-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
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 instancMetadata
Metadata
Assignees
Labels
No labels