diff --git a/implementation-contributed/javascriptcore/stress/json-stringify-no-arguments.js b/implementation-contributed/javascriptcore/stress/json-stringify-no-arguments.js new file mode 100644 index 0000000000000000000000000000000000000000..905ac253905510c2d92ca305c20fd17101fdbdb2 --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/json-stringify-no-arguments.js @@ -0,0 +1,7 @@ +function shouldBe(actual, expected) { + if (actual !== expected) + throw new Error('bad value: ' + actual); +} + +shouldBe(JSON.stringify(), undefined); +shouldBe(JSON.stringify(undefined), undefined);