From 524cba5b3c9f4e59a29f5c4ab1ffd491eee5b6c6 Mon Sep 17 00:00:00 2001 From: jvennix-rmn Date: Wed, 29 Jul 2015 14:16:26 -0500 Subject: [PATCH 1/2] Add documentation for using chai-jquery with AMD --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 228603b..466fe0d 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,16 @@ Include `chai-jquery.js` in your test file, after `chai.js` (version 1.0.0-rc1 o ``` +If you are using an AMD like requirejs, you can pull in chai-jquery as a dependency, and it will return an initialization function that can be passed to chai: + +```js +require([ + 'chai-jquery' +], function(chaiJquery) { + chai.use(chaiJquery); +}); +``` + Use the assertions with chai's `expect` or `should` assertions. ## Assertions From d7ab8aa321f2f56b269edb42bdf66ba2acd3375b Mon Sep 17 00:00:00 2001 From: jvennix-rmn Date: Wed, 29 Jul 2015 14:17:33 -0500 Subject: [PATCH 2/2] Remove unnecessary comma. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 466fe0d..1ab10cb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Include `chai-jquery.js` in your test file, after `chai.js` (version 1.0.0-rc1 o ``` -If you are using an AMD like requirejs, you can pull in chai-jquery as a dependency, and it will return an initialization function that can be passed to chai: +If you are using an AMD like requirejs, you can pull in chai-jquery as a dependency and it will return an initialization function that can be passed to chai: ```js require([