Skip to content

Commit

Permalink
test(zoe): postpone _ in underscores until #2503 is done
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Mar 4, 2021
1 parent e9b9444 commit bfaf1be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
3 changes: 0 additions & 3 deletions packages/zoe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
});
Expand Down
10 changes: 5 additions & 5 deletions packages/zoe/test/unitTests/contractSupport/test-ratio.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand All @@ -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 .*/,
});
});
Expand All @@ -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"`,
});
});
Expand Down

0 comments on commit bfaf1be

Please sign in to comment.