Skip to content

Commit

Permalink
fix: deep-eql bump package to support symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Nov 7, 2022
1 parent 53315df commit 9f9699a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"dependencies": {
"assertion-error": "^1.1.0",
"check-error": "^1.0.2",
"deep-eql": "^4.0.0",
"deep-eql": "^4.1.2",
"loupe": "^2.3.0",
"pathval": "^1.1.1",
"type-detect": "^4.0.5"
Expand Down
21 changes: 21 additions & 0 deletions test/expect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1473,6 +1473,27 @@ describe('expect', function () {
expect(a).not.to.deep.equal({});
});

it('deep.equal(Symbol)', function () {
var symb = Symbol('a');
var a = { [symb]: 'b' }
, b = { [symb]: 'b' };
expect(a).to.deep.equal(a);
expect(a).to.deep.equal(b);

var symb2 = Symbol('c');
var c = { [symb]: { [symb2]: 'c' } }
, d = { [symb]: { [symb2]: 'b' } };
expect(c).to.deep.equal(c);
expect(d).to.not.deep.equal(c);

var symb3 = Symbol('d');
var e = { [symb]: { [symb3]: 'b' } };
expect(d).to.not.deep.equal(e);

var f = { [symb]: { [symb3]: 'b' } };
expect(e).to.deep.equal(f);
});

it('empty', function(){
function FakeArgs() {};
FakeArgs.prototype.length = 0;
Expand Down

0 comments on commit 9f9699a

Please sign in to comment.