From 05fdf7fad0a2abcd9dea7a738c03a4e0ab4130cd Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Sat, 9 Dec 2017 02:29:32 +0700 Subject: [PATCH] add #345 - related tests --- tests/library/es.symbol.js | 1 + tests/tests/es.symbol.js | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/library/es.symbol.js b/tests/library/es.symbol.js index cb4a3fd5bd02..3f3214d14112 100644 --- a/tests/library/es.symbol.js +++ b/tests/library/es.symbol.js @@ -108,6 +108,7 @@ if (JSON) { if (typeof Symbol() === 'symbol') { assert.strictEqual(JSON.stringify(Object(Symbol('symbol'))), '{}', 'boxed symbol'); } + assert.strictEqual(JSON.stringify(undefined, () => 42), '42', 'replacer works with top-level undefined'); }); } diff --git a/tests/tests/es.symbol.js b/tests/tests/es.symbol.js index 80ac3d4bf132..713700cb03c8 100644 --- a/tests/tests/es.symbol.js +++ b/tests/tests/es.symbol.js @@ -128,6 +128,7 @@ if (JSON) { if (typeof Symbol() === 'symbol') { assert.strictEqual(JSON.stringify(Object(Symbol('symbol'))), '{}', 'boxed symbol'); } + assert.strictEqual(JSON.stringify(undefined, () => 42), '42', 'replacer works with top-level undefined'); }); }