Skip to content

Commit

Permalink
Merge pull request #59 from astorije/astorije/document-dirty-chai
Browse files Browse the repository at this point in the history
Add doc about using this plugin with dirty-chai
  • Loading branch information
astorije committed May 14, 2016
2 parents 085f15a + 948e11e commit c7cb1b3
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,29 @@ plug in to Chai and be ready for use:
<script src="chai-immutable.js"></script>
```

### Using `chai-immutable` with `chai-as-promised`
### Using `chai-immutable` with other plugins

This plugin works fine in conjunction with
[`chai-as-promised`](https://github.com/domenic/chai-as-promised/) but note that
`chai-immutable` must be loaded **before** `chai-as-promised`. For example:
If you are using this plugin with
[`chai-as-promised`](https://github.com/domenic/chai-as-promised/) or
[`dirty-chai`](https://github.com/prodatakey/dirty-chai), note that
`chai-immutable` must be loaded **before** any of them. For example:

```js
var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
var chaiImmutable = require('chai-immutable');
var dirtyChai = require('dirty-chai');
var expect = chai.expect;
var chaiAsPromised = require('chai-as-promised');

chai.use(chaiImmutable);
chai.use(dirtyChai);
chai.use(chaiAsPromised);

var List = require('immutable').List;

/* ... */
return expect(List.of(1, 2, 3)).to.eventually.have.size(3);
expect(true).to.be.true();
```

## BDD API Reference
Expand Down

0 comments on commit c7cb1b3

Please sign in to comment.