File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -365,14 +365,24 @@ QUnit.asyncTest( "isPlainObject", function( assert ) {
365365 }
366366} ) ;
367367
368- //
369368QUnit [ typeof Symbol === "function" ? "test" : "skip" ] ( "isPlainObject(Symbol)" , function ( assert ) {
370369 assert . expect ( 2 ) ;
371370
372371 assert . equal ( jQuery . isPlainObject ( Symbol ( ) ) , false , "Symbol" ) ;
373372 assert . equal ( jQuery . isPlainObject ( Object ( Symbol ( ) ) ) , false , "Symbol inside an object" ) ;
374373} ) ;
375374
375+ QUnit [ "assign" in Object ? "test" : "skip" ] ( "isPlainObject(Object.assign(...))" ,
376+ function ( assert ) {
377+ assert . expect ( 1 ) ;
378+
379+ var parentObj = { foo : "bar" } ;
380+ var childObj = Object . assign ( Object . create ( parentObj ) , { bar : "foo" } ) ;
381+
382+ assert . ok ( ! jQuery . isPlainObject ( childObj ) , "isPlainObject(Object.assign(...))" ) ;
383+ }
384+ ) ;
385+
376386
377387QUnit . test ( "isFunction" , function ( assert ) {
378388 assert . expect ( 19 ) ;
You can’t perform that action at this time.
0 commit comments