Skip to content

Commit 76d590d

Browse files
committed
fix: update error messages in tests.
1 parent e61ba9d commit 76d590d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/zoe/test/unitTests/contractSupport/test-ratio.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -404,19 +404,19 @@ test('ratio bad inputs', t => {
404404
message: '100.5 not a safe integer',
405405
});
406406
t.throws(() => makeRatioFromAmounts(3n, moe(30n)), {
407-
message: `The brand "[3n]" doesn't look like a brand.`,
407+
message: `The brand "[undefined]" doesn't look like a brand.`,
408408
});
409409
t.throws(() => floorMultiplyBy(37, makeRatioFromAmounts(moe(3n), moe(5n))), {
410-
message: `The brand 37 doesn't look like a brand.`,
410+
message: `The brand "[undefined]" doesn't look like a brand.`,
411411
});
412412
t.throws(() => ceilMultiplyBy(37, makeRatioFromAmounts(moe(3n), moe(5n))), {
413-
message: `The brand 37 doesn't look like a brand.`,
413+
message: `The brand "[undefined]" doesn't look like a brand.`,
414414
});
415415
t.throws(() => floorDivideBy(makeRatioFromAmounts(moe(3n), moe(5n)), 37), {
416-
message: `The brand {"numerator":{"brand":"[Alleged: moe brand]","value":"[3n]"},"denominator":{"brand":"[Seen]","value":"[5n]"}} doesn't look like a brand.`,
416+
message: `The brand "[undefined]" doesn't look like a brand.`,
417417
});
418418
t.throws(() => ceilDivideBy(makeRatioFromAmounts(moe(3n), moe(5n)), 37), {
419-
message: `The brand {"numerator":{"brand":"[Alleged: moe brand]","value":"[3n]"},"denominator":{"brand":"[Seen]","value":"[5n]"}} doesn't look like a brand.`,
419+
message: `The brand "[undefined]" doesn't look like a brand.`,
420420
});
421421
t.throws(() => makeRatio(3n, brand, 0n), {
422422
message: /No infinite ratios! Denominator was 0/,
@@ -436,10 +436,10 @@ test('ratio bad inputs deprecated', t => {
436436
const moe = value => AmountMath.make(value, brand);
437437
// @ts-ignore invalid arguments for testing
438438
t.throws(() => multiplyBy(37, makeRatioFromAmounts(moe(3n), moe(5n))), {
439-
message: `The brand 37 doesn't look like a brand.`,
439+
message: `The brand "[undefined]" doesn't look like a brand.`,
440440
});
441441
t.throws(() => divideBy(makeRatioFromAmounts(moe(3n), moe(5n)), 37), {
442-
message: `The brand {"numerator":{"brand":"[Alleged: moe brand]","value":"[3n]"},"denominator":{"brand":"[Seen]","value":"[5n]"}} doesn't look like a brand.`,
442+
message: `The brand "[undefined]" doesn't look like a brand.`,
443443
});
444444
});
445445

0 commit comments

Comments
 (0)