Skip to content

Commit 542f181

Browse files
committed
Add .eql() as an alias of .equal()
This is only true when inner elements are all immutable, but #24 shows up that it should always be the case anyway.
1 parent 10b1827 commit 542f181

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

chai-immutable.js

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
* @name equal
8484
* @alias equals
8585
* @alias eq
86+
* @alias eql
8687
* @alias deep.equal
8788
* @param {Collection} value
8889
* @api public
@@ -107,6 +108,7 @@
107108
Assertion.overwriteMethod('equal', assertCollectionEqual);
108109
Assertion.overwriteMethod('equals', assertCollectionEqual);
109110
Assertion.overwriteMethod('eq', assertCollectionEqual);
111+
Assertion.overwriteMethod('eql', assertCollectionEqual);
110112

111113
/**
112114
* ### .include(value)

test/test.js

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ describe('chai-immutable (' + typeEnv + ')', function () {
6262
expect(list3).to.not.equals(new List());
6363
expect(list3).to.eq(List.of(1, 2, 3));
6464
expect(list3).to.not.eq(new List());
65+
expect(list3).to.eql(List.of(1, 2, 3));
66+
expect(list3).to.not.eql(new List());
6567
expect(list3).to.deep.equal(List.of(1, 2, 3));
6668
expect(list3).to.not.deep.equal(new List());
6769
});

0 commit comments

Comments
 (0)