From 01648e769cef6c041d98556db77c4ed73197f557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Maisse?= Date: Thu, 13 May 2021 21:08:10 +0200 Subject: [PATCH] test: remove check on BigInt support as we are now targeting Node 12+ --- test/common/index.test.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/test/common/index.test.js b/test/common/index.test.js index 1a6072f..de88c94 100644 --- a/test/common/index.test.js +++ b/test/common/index.test.js @@ -230,18 +230,15 @@ const tests = ({ stringify, parse }) => { expect(parsed).toMatchObject(data); }); - // BigInt only comes with Node > 10.4.0 - if ('BigInt' in global) { - test('check BigInt value', () => { - const data = { LotOfFruits: BigInt("123456789123456789123456789123456789") }; + test('check BigInt value', () => { + const data = { LotOfFruits: BigInt('123456789123456789123456789123456789') }; - const stringified = stringify(data); - const parsed = parse(stringified); + const stringified = stringify(data); + const parsed = parse(stringified); - expect(stringified).toEqual('{"LotOfFruits":"_bigint_123456789123456789123456789123456789"}'); - expect(parsed).toMatchObject(data); - }); - } + expect(stringified).toEqual('{"LotOfFruits":"_bigint_123456789123456789123456789123456789"}'); + expect(parsed).toMatchObject(data); + }); test('check undefined value', () => { const data = { undefinedFruit: undefined };