From 9090d98439f8dc449beafee98f8ff35cfb4f9116 Mon Sep 17 00:00:00 2001 From: Liza Ramo Date: Sun, 18 Oct 2015 15:00:38 -0400 Subject: [PATCH] Core: add unit test for isPlainObject(Symbol) Fixes #2645 Closes #2661 --- test/unit/core.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/unit/core.js b/test/unit/core.js index 26602dcb2..36504855d 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -353,6 +353,15 @@ QUnit.asyncTest( "isPlainObject", function( assert ) { } } ); +// +QUnit[ typeof Symbol === "function" ? "test" : "skip" ]( "isPlainObject(Symbol)", function( assert ) { + assert.expect( 2 ); + + assert.equal( jQuery.isPlainObject( Symbol() ), false, "Symbol" ); + assert.equal( jQuery.isPlainObject( Object( Symbol() ) ), false, "Symbol inside an object" ); +} ); + + QUnit.test( "isFunction", function( assert ) { assert.expect( 19 ); -- 2.39.5