summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/JSON/stringify/value-bigint.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/test262/built-ins/JSON/stringify/value-bigint.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/JSON/stringify/value-bigint.js b/js/src/tests/test262/built-ins/JSON/stringify/value-bigint.js
new file mode 100644
index 0000000000..f924aec4a5
--- /dev/null
+++ b/js/src/tests/test262/built-ins/JSON/stringify/value-bigint.js
@@ -0,0 +1,14 @@
+// Copyright (C) 2017 Robin Templeton. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+description: JSON serialization of BigInt values
+esid: pending
+features: [BigInt]
+---*/
+
+assert.throws(TypeError, () => JSON.stringify(0n));
+assert.throws(TypeError, () => JSON.stringify(Object(0n)));
+assert.throws(TypeError, () => JSON.stringify({x: 0n}));
+
+reportCompare(0, 0);