Robin Templeton 184a37f011 additional BigInt JSON tests (#1235)
* additional BigInt JSON tests

* single quotes

* BigInt stringify order of steps
2017-10-03 17:00:31 -04:00

13 lines
396 B
JavaScript

// 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}));