From 0ab69ca0ddb49dddf1396066a2b0021a67549b55 Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 5 Jul 2023 12:32:29 +0200 Subject: [PATCH] improve test --- packages/bridge-ui/src/utils/toBigNumber.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/bridge-ui/src/utils/toBigNumber.spec.ts b/packages/bridge-ui/src/utils/toBigNumber.spec.ts index d9f56c187cc..2fbba2c326b 100644 --- a/packages/bridge-ui/src/utils/toBigNumber.spec.ts +++ b/packages/bridge-ui/src/utils/toBigNumber.spec.ts @@ -8,5 +8,8 @@ describe('toBigNumber', () => { expect(toBigNumber(2e+21).toString()).toEqual('2000000000000000000000'); expect(toBigNumber(3e21).toString()).toEqual('3000000000000000000000'); expect(toBigNumber(1000).toString()).toEqual('1000'); + + // Number.MAX_SAFE_INTEGER = 9007199254740991. Maximum safe integer (2^53 – 1) + expect(toBigNumber(BigInt(Number.MAX_SAFE_INTEGER) * 3n).toString()).toEqual('27021597764222973'); }); });