tests/auto/qml/ecmascripttests/test262/test/built-ins/JSON/stringify/bigint.js
raw| 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})); |