Skip to content

Commit 9090d98

Browse files
LizaLemonsdmethvin
authored andcommitted
Core: add unit test for isPlainObject(Symbol)
Fixes jquery#2645 Closes jquery#2661
1 parent 32cfc38 commit 9090d98

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
@@ -353,6 +353,15 @@ QUnit.asyncTest( "isPlainObject", function( assert ) {
353353
}
354354
} );
355355

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

0 commit comments

Comments
 (0)