Skip to content

Commit

Permalink
Add .eql() as an alias of .equal()
Browse files Browse the repository at this point in the history
This is only true when inner elements are all immutable, but #24 shows
up that it should always be the case anyway.
  • Loading branch information
astorije committed Oct 18, 2015
1 parent 10b1827 commit 542f181
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chai-immutable.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
* @name equal
* @alias equals
* @alias eq
* @alias eql
* @alias deep.equal
* @param {Collection} value
* @api public
Expand All @@ -107,6 +108,7 @@
Assertion.overwriteMethod('equal', assertCollectionEqual);
Assertion.overwriteMethod('equals', assertCollectionEqual);
Assertion.overwriteMethod('eq', assertCollectionEqual);
Assertion.overwriteMethod('eql', assertCollectionEqual);

/**
* ### .include(value)
Expand Down
2 changes: 2 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ describe('chai-immutable (' + typeEnv + ')', function () {
expect(list3).to.not.equals(new List());
expect(list3).to.eq(List.of(1, 2, 3));
expect(list3).to.not.eq(new List());
expect(list3).to.eql(List.of(1, 2, 3));
expect(list3).to.not.eql(new List());
expect(list3).to.deep.equal(List.of(1, 2, 3));
expect(list3).to.not.deep.equal(new List());
});
Expand Down

0 comments on commit 542f181

Please sign in to comment.