Skip to content

Commit 696a8b8

Browse files
committed
add #345 - related tests
1 parent 0cdb666 commit 696a8b8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tests/library/es.symbol.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ if (JSON) {
108108
if (typeof Symbol() === 'symbol') {
109109
assert.strictEqual(JSON.stringify(Object(Symbol('symbol'))), '{}', 'boxed symbol');
110110
}
111+
assert.strictEqual(JSON.stringify(undefined, () => 42), '42', 'replacer works with top-level undefined');
111112
});
112113
}
113114

tests/tests/es.symbol.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ if (JSON) {
128128
if (typeof Symbol() === 'symbol') {
129129
assert.strictEqual(JSON.stringify(Object(Symbol('symbol'))), '{}', 'boxed symbol');
130130
}
131+
assert.strictEqual(JSON.stringify(undefined, () => 42), '42', 'replacer works with top-level undefined');
131132
});
132133
}
133134

0 commit comments

Comments
 (0)