Skip to content

Commit

Permalink
test: remove check on BigInt support as we are now targeting Node 12+
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetanmaisse committed May 13, 2021
1 parent b3b18d4 commit 01648e7
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions test/common/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit 01648e7

Please sign in to comment.