aboutsummaryrefslogtreecommitdiffstats
path: root/test/built-ins/JSON/stringify/bigint.js
blob: 80d17799ef4b957be8da3fb5a0de1859d4676a69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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}));