@@ -263,7 +263,9 @@ assertNotDeepOrStrict(createSet([1, 2, 3, 4]), createSet([1, 2, 3]));
263263assertDeepAndStrictEqual ( createSet ( [ '1' , '2' , '3' ] ) , createSet ( [ '1' , '2' , '3' ] ) ) ;
264264assertDeepAndStrictEqual ( createSet ( [ [ 1 , 2 ] , [ 3 , 4 ] ] ) , createSet ( [ [ 3 , 4 ] , [ 1 , 2 ] ] ) ) ;
265265assertNotDeepOrStrict ( createSet ( [ { a : 0 } ] ) , createSet ( [ { a : 1 } ] ) ) ;
266- assertNotDeepOrStrict ( createSet ( [ Symbol ( ) ] ) , createSet ( [ Symbol ( ) ] ) ) ;
266+ if ( common . symbolSupported ) {
267+ assertNotDeepOrStrict ( createSet ( [ Symbol ( ) ] ) , createSet ( [ Symbol ( ) ] ) ) ;
268+ }
267269
268270{
269271 const a = [ 1 , 2 ] ;
@@ -633,7 +635,7 @@ assert.deepStrictEqual({ a: NaN }, { a: NaN });
633635assert . deepStrictEqual ( [ 1 , 2 , NaN , 4 ] , [ 1 , 2 , NaN , 4 ] ) ;
634636
635637// Handle boxed primitives
636- {
638+ if ( common . symbolSupported ) {
637639 const boxedString = new String ( 'test' ) ;
638640 const boxedSymbol = Object ( Symbol ( ) ) ;
639641 assertNotDeepOrStrict ( new Boolean ( true ) , Object ( false ) ) ;
@@ -656,7 +658,7 @@ assertOnlyDeepEqual(0, -0);
656658assertDeepAndStrictEqual ( - 0 , - 0 ) ;
657659
658660// Handle symbols (enumerable only)
659- {
661+ if ( common . symbolSupported ) {
660662 const symbol1 = Symbol ( ) ;
661663 const obj1 = { [ symbol1 ] : 1 } ;
662664 const obj2 = { [ symbol1 ] : 1 } ;
@@ -780,13 +782,15 @@ assertNotDeepOrStrict('a', ['a']);
780782assertNotDeepOrStrict ( 'a' , { 0 : 'a' } ) ;
781783assertNotDeepOrStrict ( 1 , { } ) ;
782784assertNotDeepOrStrict ( true , { } ) ;
783- assertNotDeepOrStrict ( Symbol ( ) , { } ) ;
784- assertNotDeepOrStrict ( Symbol ( ) , Symbol ( ) ) ;
785+ if ( common . symbolSupported ) {
786+ assertNotDeepOrStrict ( Symbol ( ) , { } ) ;
787+ assertNotDeepOrStrict ( Symbol ( ) , Symbol ( ) ) ;
788+ }
785789
786790assertOnlyDeepEqual ( 4 , '4' ) ;
787791assertOnlyDeepEqual ( true , 1 ) ;
788792
789- {
793+ if ( common . symbolSupported ) {
790794 const s = Symbol ( ) ;
791795 assertDeepAndStrictEqual ( s , s ) ;
792796}
@@ -978,7 +982,7 @@ assert.deepStrictEqual(obj1, obj2);
978982// Strict equal with identical objects that are not identical
979983// by reference and longer than 30 elements
980984// E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() })
981- {
985+ if ( common . symbolSupported ) {
982986 const a = { } ;
983987 const b = { } ;
984988 for ( let i = 0 ; i < 35 ; i ++ ) {
0 commit comments