File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments