@@ -158,9 +158,25 @@ test('assert.deepEqual - instances', function () {
158158 nameBuilder2 . prototype = Object ;
159159 nb2 = new nameBuilder2 ( 'Ryan' , 'Dahl' ) ;
160160 assert . throws ( makeBlock ( assert . deepEqual , nb1 , nb2 ) , assert . AssertionError ) ;
161+ } ) ;
162+
163+ test ( 'assert.deepEqual - ES6 primitives' , function ( ) {
164+ assert . throws ( makeBlock ( assert . deepEqual , null , { } ) , assert . AssertionError ) ;
165+ assert . throws ( makeBlock ( assert . deepEqual , undefined , { } ) , assert . AssertionError ) ;
166+ assert . throws ( makeBlock ( assert . deepEqual , 'a' , [ 'a' ] ) , assert . AssertionError ) ;
167+ assert . throws ( makeBlock ( assert . deepEqual , 'a' , { 0 : 'a' } ) , assert . AssertionError ) ;
168+ assert . throws ( makeBlock ( assert . deepEqual , 1 , { } ) , assert . AssertionError ) ;
169+ assert . throws ( makeBlock ( assert . deepEqual , true , { } ) , assert . AssertionError ) ;
170+ if ( typeof Symbol === 'symbol' ) {
171+ assert . throws ( makeBlock ( assert . deepEqual , Symbol ( ) , { } ) , assert . AssertionError ) ;
172+ }
173+ } ) ;
161174
162- // String literal + object blew up my implementation...
163- assert . throws ( makeBlock ( assert . deepEqual , 'a' , { } ) , assert . AssertionError ) ;
175+ test ( 'assert.deepEqual - object wrappers' , function ( ) {
176+ assert . doesNotThrow ( makeBlock ( assert . deepEqual , new String ( 'a' ) , [ 'a' ] ) ) ;
177+ assert . doesNotThrow ( makeBlock ( assert . deepEqual , new String ( 'a' ) , { 0 : 'a' } ) ) ;
178+ assert . doesNotThrow ( makeBlock ( assert . deepEqual , new Number ( 1 ) , { } ) ) ;
179+ assert . doesNotThrow ( makeBlock ( assert . deepEqual , new Boolean ( true ) , { } ) ) ;
164180} ) ;
165181
166182function thrower ( errorConstructor ) {
0 commit comments