| function shouldBe(actual, expected) |
| throw new Error('bad value: ' + actual); |
| function shouldThrow(func, errorMessage) { |
| throw new Error('not thrown'); |
| if (String(error) !== errorMessage) |
| throw new Error(`bad error: ${String(error)}`); |
| }, `TypeError: JSON.stringify cannot serialize BigInt.`); |
| }, `TypeError: JSON.stringify cannot serialize BigInt.`); |
| JSON.stringify({hello:0n}); |
| }, `TypeError: JSON.stringify cannot serialize BigInt.`); |
| var bigIntObject = Object(0n); |
| JSON.stringify(bigIntObject); |
| }, `TypeError: JSON.stringify cannot serialize BigInt.`); |
| JSON.stringify([bigIntObject]); |
| }, `TypeError: JSON.stringify cannot serialize BigInt.`); |
| JSON.stringify({hello:bigIntObject}); |
| }, `TypeError: JSON.stringify cannot serialize BigInt.`); |