diff --git a/tests/as-int-n.mjs b/tests/as-int-n.mjs index 641230b..21ebae2 100644 --- a/tests/as-int-n.mjs +++ b/tests/as-int-n.mjs @@ -285,9 +285,7 @@ const uintn_data = [ function parse(string) { if (string.charCodeAt(0) === 0x2D) { // '-' - const result = JSBI.BigInt(string.slice(1)); - result.sign = true; - return result; + return JSBI.unaryMinus(JSBI.BigInt(string.slice(1))); } return JSBI.BigInt(string); } diff --git a/tests/tests.mjs b/tests/tests.mjs index efca1ab..62d664c 100644 --- a/tests/tests.mjs +++ b/tests/tests.mjs @@ -133,9 +133,7 @@ const TESTS = [ function parse(string) { if (string.charCodeAt(0) === 0x2D) { // '-' - const result = JSBI.BigInt(string.slice(1)); - result.sign = true; - return result; + return JSBI.unaryMinus(JSBI.BigInt(string.slice(1))); } return JSBI.BigInt(string); }