Skip to content

Commit ec45649

Browse files
committed
add test
1 parent c14d114 commit ec45649

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/expect.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,27 @@ describe('expect', function () {
14731473
expect(a).not.to.deep.equal({});
14741474
});
14751475

1476+
it('deep.equal(Symbol)', function () {
1477+
var symb = Symbol('a');
1478+
var a = { [symb]: 'b' }
1479+
, b = { [symb]: 'b' };
1480+
expect(a).to.deep.equal(a);
1481+
expect(a).to.deep.equal(b);
1482+
1483+
var symb2 = Symbol('c');
1484+
var c = { [symb]: { [symb2]: 'c' } }
1485+
, d = { [symb]: { [symb2]: 'b' } };
1486+
expect(c).to.deep.equal(c);
1487+
expect(d).to.not.deep.equal(c);
1488+
1489+
var symb3 = Symbol('d');
1490+
var e = { [symb]: { [symb3]: 'b' } };
1491+
expect(d).to.not.deep.equal(e);
1492+
1493+
var f = { [symb]: { [symb3]: 'b' } };
1494+
expect(e).to.deep.equal(f);
1495+
});
1496+
14761497
it('empty', function(){
14771498
function FakeArgs() {};
14781499
FakeArgs.prototype.length = 0;

0 commit comments

Comments
 (0)