Skip to content

Commit

Permalink
test(patterns): revert error msg improvement that breaks old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jun 15, 2023
1 parent c224a3c commit 18a34fa
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/patterns/src/patterns/patternMatchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -953,8 +953,19 @@ const makePatternKit = () => {
false,
// `label` can be embedded without quotes because it is provided by
// local code like `M.remotable("...")`.
X`${specimen} - Must be a remotable ${b(label)}, not ${kindDetails}`,
X`${kindDetails} ${specimen} - Must be a remotable (${b(label)})`,
);
// We would like to use the commented out code below rather than the
// the similar code immediately above. The new code improves the error
// message, which is great. However, currently agoric-sdk has tests that
// depend on the error message emitted by the code above.
// TODO use the code below when we can.
//
// return check(
// false,
// // `label` can be embedded without quotes because it is provided by
// // local code like `M.remotable("...")`.
// X`${specimen} - Must be a remotable ${b(label)}, not ${kindDetails}`,
},

checkIsWellFormed: (allegedRemotableDesc, check) =>
Expand Down

0 comments on commit 18a34fa

Please sign in to comment.