We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
JSON.stringify
Symbol
1 parent a960011 commit fcb5962Copy full SHA for fcb5962
test/json.js
@@ -10,11 +10,12 @@ describe('JSON', function () {
10
expect(JSON.stringify([Symbol('foo')])).to.eql('[null]');
11
});
12
13
- ifSymbolsIt('skips symbol properties in an object', function () {
+ ifSymbolsIt('skips symbol properties and values in an object', function () {
14
var obj = {};
15
var enumSym = Symbol('enumerable');
16
var nonenum = Symbol('non-enumerable');
17
obj[enumSym] = true;
18
+ obj.sym = enumSym;
19
Object.defineProperty(obj, nonenum, { enumerable: false, value: true });
20
expect(Object.getOwnPropertySymbols(obj)).to.eql([enumSym, nonenum]);
21
expect(JSON.stringify(obj)).to.eql('{}');
0 commit comments