Skip to content

Commit

Permalink
fix: standardize whether keywords are quoted
Browse files Browse the repository at this point in the history
  • Loading branch information
katelynsills committed Sep 17, 2020
1 parent 0de4bcd commit 1fa44d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/zoe/src/contractFacet/contractFacet.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// time this file is edited, the bundle must be manually rebuilt with
// `yarn build-zcfBundle`.

import { assert, details } from '@agoric/assert';
import { assert, details, q } from '@agoric/assert';
import { E } from '@agoric/eventual-send';
import makeWeakStore from '@agoric/weak-store';
import makeStore from '@agoric/store';
Expand Down Expand Up @@ -86,7 +86,7 @@ export function buildRootObject(_powers, _params, testJigSetter = undefined) {
assertKeywordName(keyword);
assert(
!getKeywords(instanceRecord.terms.issuers).includes(keyword),
details`keyword ${keyword} must be unique`,
details`keyword ${q(keyword)} must be unique`,
);
return registerIssuerRecord(keyword, issuerRecord);
};
Expand Down Expand Up @@ -310,7 +310,7 @@ export function buildRootObject(_powers, _params, testJigSetter = undefined) {
assertKeywordName(keyword);
assert(
!getKeywords(instanceRecord.terms.issuers).includes(keyword),
details`keyword ${keyword} must be unique`,
details`keyword ${q(keyword)} must be unique`,
);
},
saveIssuer: async (issuerP, keyword) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/zoe/test/unitTests/zcf/test-zcf.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ test(`zcf.assertUniqueKeyword`, async t => {
const issuerKeywordRecord = { A: moolaKit.issuer, B: simoleanKit.issuer };
const { zcf } = await setupZCFTest(issuerKeywordRecord);
t.throws(() => zcf.assertUniqueKeyword('A'), {
message: 'keyword (a string) must be unique\nSee console for error data.',
message: 'keyword "A" must be unique\nSee console for error data.',
});
t.throws(() => zcf.assertUniqueKeyword('B'), {
message: 'keyword (a string) must be unique\nSee console for error data.',
message: 'keyword "B" must be unique\nSee console for error data.',
});
// Unique, but not a valid Keyword
t.throws(() => zcf.assertUniqueKeyword('a'), {
Expand Down

0 comments on commit 1fa44d9

Please sign in to comment.