Skip to content

Commit d3a2fdc

Browse files
LizaLemonsdmethvin
authored andcommitted
Core: add unit test for isPlainObject(Symbol)
Fixes #2645 Closes #2661 (cherry picked from commit 9090d98)
1 parent 214e163 commit d3a2fdc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/unit/core.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,15 @@ QUnit.asyncTest( "isPlainObject", function( assert ) {
355355
}
356356
} );
357357

358+
//
359+
QUnit[ typeof Symbol === "function" ? "test" : "skip" ]( "isPlainObject(Symbol)", function( assert ) {
360+
assert.expect( 2 );
361+
362+
assert.equal( jQuery.isPlainObject( Symbol() ), false, "Symbol" );
363+
assert.equal( jQuery.isPlainObject( Object( Symbol() ) ), false, "Symbol inside an object" );
364+
} );
365+
366+
358367
QUnit.test( "isFunction", function( assert ) {
359368
assert.expect( 19 );
360369

0 commit comments

Comments
 (0)