Skip to content

Commit a49ba4a

Browse files
committed
Add a mention to #24 in the README
This explains that immutable structures should only contain other immutable structures when used against `.equal()`, or the result is likely to be unexpected.
1 parent 5908ecb commit a49ba4a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ var b = List.of(1, 2, 3);
6262
expect(a).to.equal(b);
6363
```
6464

65+
Immutable data structures should only contain other immutable data
66+
structures (unlike `Array`s and `Object`s) to be considered immutable and
67+
properly work against `.equal()`. See
68+
[this issue](https://github.com/astorije/chai-immutable/issues/24) for
69+
more information.
70+
6571
### .include(value)
6672

6773
- **@param** *{ Mixed }* val

chai-immutable.js

+6
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@
7474
* expect(a).to.equal(b);
7575
* ```
7676
*
77+
* Immutable data structures should only contain other immutable data
78+
* structures (unlike `Array`s and `Object`s) to be considered immutable and
79+
* properly work against `.equal()`. See
80+
* [this issue](https://github.com/astorije/chai-immutable/issues/24) for
81+
* more information.
82+
*
7783
* @name equal
7884
* @alias equals
7985
* @alias eq

0 commit comments

Comments
 (0)