Skip to content

Commit

Permalink
fixup! fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jun 19, 2024
1 parent d9e86e9 commit cd107b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/zoe/src/contractFacet/typeGuards.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export const ZcfI = M.interface(
makeInvitation: M.call(M.raw(), M.string())
.optional(M.record(), M.pattern())
.returns(M.promise()),
setTestJig: M.call(M.raw()).returns(),
// TODO raw argument should be mandatory, but there's a no-arg call in
// the documentation repo
setTestJig: M.call().optional(M.raw()).returns(),
},
{
defaultGuards: 'passable',
Expand Down
6 changes: 4 additions & 2 deletions packages/zoe/test/unitTests/zcf/zcf.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ test(`zcf.makeInvitation - no description`, async t => {
const { zcf } = await setupZCFTest();
// @ts-expect-error deliberate invalid arguments for testing
t.throws(() => zcf.makeInvitation(() => {}), {
message: 'invitations must have a description string: "[undefined]"',
message:
'In "makeInvitation" method of (zcf): Expected at least 2 arguments: ["<redacted raw arg>"]',
});
});

Expand All @@ -296,7 +297,8 @@ test(`zcf.makeInvitation - non-string description`, async t => {
// https://github.com/Agoric/agoric-sdk/issues/1704
// @ts-expect-error deliberate invalid arguments for testing
t.throws(() => zcf.makeInvitation(() => {}, { something: 'a' }), {
message: /invitations must have a description string: .*/,
message:
'In "makeInvitation" method of (zcf): arg 1: copyRecord {"something":"a"} - Must be a string',
});
});

Expand Down

0 comments on commit cd107b5

Please sign in to comment.