From bfaf1bef67af99882233e392670d5700f35af568 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Tue, 2 Mar 2021 18:19:55 -0600 Subject: [PATCH] test(zoe): postpone _ in underscores until #2503 is done --- packages/zoe/package.json | 3 --- .../unitTests/contractSupport/test-percentSupport.js | 4 ++-- .../zoe/test/unitTests/contractSupport/test-ratio.js | 10 +++++----- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/zoe/package.json b/packages/zoe/package.json index 7d783d4885e..9adb3debff3 100644 --- a/packages/zoe/package.json +++ b/packages/zoe/package.json @@ -78,9 +78,6 @@ "test-loan-e2e.js", "# another SEGV, but not in --debug so I cannot get a stack trace", "contracts/test-callSpread-calculation", - "# test-ratio uses _ which is not supported yet", - "test-ratio", - "test-percentSupport", "# trouble locating zcfTesterContract using __dirname", "loan/test-addCollateral", "loan/test-borrow", diff --git a/packages/zoe/test/unitTests/contractSupport/test-percentSupport.js b/packages/zoe/test/unitTests/contractSupport/test-percentSupport.js index b2996b1d107..f252098e5c8 100644 --- a/packages/zoe/test/unitTests/contractSupport/test-percentSupport.js +++ b/packages/zoe/test/unitTests/contractSupport/test-percentSupport.js @@ -37,8 +37,8 @@ test('ratio - ALL', t => { amountsEqual( t, - multiplyBy(moe(100_000), make100Percent(brand)), - moe(100_000), + multiplyBy(moe(100000), make100Percent(brand)), + moe(100000), brand, ); }); diff --git a/packages/zoe/test/unitTests/contractSupport/test-ratio.js b/packages/zoe/test/unitTests/contractSupport/test-ratio.js index eee7741e44e..9e8bafbbf90 100644 --- a/packages/zoe/test/unitTests/contractSupport/test-ratio.js +++ b/packages/zoe/test/unitTests/contractSupport/test-ratio.js @@ -77,7 +77,7 @@ test('ratio - different brands', t => { const ast = astAmountMath.make; const convertToMoe = makeRatioFromAmounts(moe(1), astAmountMath.make(3)); - amountsEqual(t, multiplyBy(ast(10_000), convertToMoe), moe(3333), moeBrand); + amountsEqual(t, multiplyBy(ast(10000), convertToMoe), moe(3333), moeBrand); }); test('ratio - brand mismatch', t => { @@ -87,10 +87,10 @@ test('ratio - brand mismatch', t => { const ast = astAmountMath.make; const convertToMoe = makeRatioFromAmounts(moe(1), astAmountMath.make(3)); - t.throws(() => divideBy(ast(10_000), convertToMoe), { + t.throws(() => divideBy(ast(10000), convertToMoe), { message: /amount's brand .* must match ratio's numerator .*/, }); - t.throws(() => multiplyBy(moe(10_000), convertToMoe), { + t.throws(() => multiplyBy(moe(10000), convertToMoe), { message: /amount's brand .* must match ratio's denominator .*/, }); }); @@ -102,10 +102,10 @@ test.failing('ratio - brand mismatch & details', t => { const ast = astAmountMath.make; const convertToMoe = makeRatioFromAmounts(moe(1), astAmountMath.make(3)); - t.throws(() => divideBy(ast(10_000), convertToMoe), { + t.throws(() => divideBy(ast(10000), convertToMoe), { message: `amount's brand "ast" must match ratio's numerator "moe"`, }); - t.throws(() => multiplyBy(moe(10_000), convertToMoe), { + t.throws(() => multiplyBy(moe(10000), convertToMoe), { message: `amount's brand "moe" must match ratio's denominator "ast"`, }); });