value-bigint.js (418B)
1 // Copyright (C) 2017 Robin Templeton. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 description: JSON serialization of BigInt values 6 esid: pending 7 features: [BigInt] 8 ---*/ 9 10 assert.throws(TypeError, () => JSON.stringify(0n)); 11 assert.throws(TypeError, () => JSON.stringify(Object(0n))); 12 assert.throws(TypeError, () => JSON.stringify({x: 0n})); 13 14 reportCompare(0, 0);