Skip to content

Commit

Permalink
fix: fixed error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
amessbee committed May 15, 2024
1 parent 16f9331 commit d385a8f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions contract/test/test-cateCoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ const contractPath = myRequire.resolve(`../src/cateCoin.contract.js`);

const test = anyTest;

const { zoeService: zoe, feeMintAccess } = makeZoeKitForTest();
const bundleCache = await makeNodeBundleCache(
'bundles/',
{},
nodeModuleSpecifier => import(nodeModuleSpecifier),
);

const makeTestContext = async _t => {
try {
const { zoeService: zoe, feeMintAccess } = makeZoeKitForTest();
const bundleCache = await makeNodeBundleCache(
'bundles/',
{},
nodeModuleSpecifier => import(nodeModuleSpecifier),
);
const bundle = await bundleCache.load(contractPath, 'assetContract');

await E(zoe).install(bundle);
Expand Down Expand Up @@ -122,6 +123,7 @@ test('transferCateCoins two purses', async t => {
const { creatorFacet } = await E(zoe).startInstance(installation);

const cateIssuer = await E(creatorFacet).getIssuer();
const cateBrand = cateIssuer.getBrand();
const fromPurse = await E(cateIssuer).makeEmptyPurse();
await E(creatorFacet).createInitialCoins(fromPurse, 1000n);
const toPurse = await E(cateIssuer).makeEmptyPurse();
Expand All @@ -145,6 +147,7 @@ test('transferCateCoins more than sender has', async t => {
const { creatorFacet } = await E(zoe).startInstance(installation);

const cateIssuer = await E(creatorFacet).getIssuer();
const cateBrand = cateIssuer.getBrand();
const fromPurse = await E(cateIssuer).makeEmptyPurse();
await E(creatorFacet).createInitialCoins(fromPurse, 1000n);
const toPurse = await E(cateIssuer).makeEmptyPurse();
Expand Down

0 comments on commit d385a8f

Please sign in to comment.