Skip to content

Commit

Permalink
Merge pull request #38 from astorije/astorije/chai-as-promised-doc
Browse files Browse the repository at this point in the history
Add doc about integration with chai-as-promised
  • Loading branch information
astorije committed Jan 18, 2016
2 parents 6a9c9ed + 831fb7e commit c0407a4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,27 @@ plug in to Chai and be ready for use:
<script src="chai-immutable.js"></script>
```

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

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:

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

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

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

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

## BDD API Reference

### .empty
Expand Down

0 comments on commit c0407a4

Please sign in to comment.