Skip to content

Commit

Permalink
fixup! fix(lint): tests
Browse files Browse the repository at this point in the history
remove explicit context typing
  • Loading branch information
mujahidkay committed Sep 13, 2024
1 parent fdca273 commit 288727b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions contract/test/test-contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ test('Install the contract', async t => {
});

test('Start the contract', async t => {
const { zoe, bundle } = /** @type {TestContext} */ (t.context);
const { zoe, bundle } = t.context;

const money = makeIssuerKit('PlayMoney');
const issuers = { Price: money.issuer };
Expand Down Expand Up @@ -118,7 +118,7 @@ const alice = async (t, zoe, instance, purse, choices = ['map', 'scroll']) => {
};

test('Alice trades: give some play money, want items', async t => {
const { zoe, bundle } = /** @type {TestContext} */ (t.context);
const { zoe, bundle } = t.context;

const money = makeIssuerKit('PlayMoney');
const issuers = { Price: money.issuer };
Expand Down Expand Up @@ -157,8 +157,7 @@ test('Trade in IST rather than play money', async t => {
);
};

const { zoe, bundle, bundleCache, feeMintAccess } =
/** @type {TestContext} */ (t.context);
const { zoe, bundle, bundleCache, feeMintAccess } = t.context;
const { instance } = await startContract({ zoe, bundle });
const { faucet } = makeStableFaucet({ bundleCache, feeMintAccess, zoe });
await alice(t, zoe, instance, await faucet(5n * UNIT6));
Expand Down Expand Up @@ -191,7 +190,7 @@ test('use the code that will go on chain to start the contract', async t => {
setValue: async () => {},
});

const { zoe } = /** @type {TestContext} */ (t.context);
const { zoe } = t.context;
const startUpgradable = async ({
installation,
issuerKeywordRecord,
Expand Down Expand Up @@ -223,7 +222,7 @@ test('use the code that will go on chain to start the contract', async t => {

// Code to install the contract is automatically
// generated by `agoric run`. No need to test that part.
const { zoe, bundle } = /** @type {TestContext} */ (t.context);
const { zoe, bundle } = t.context;
const installation = E(zoe).install(bundle);
sync.installation.resolve(installation);

Expand All @@ -233,7 +232,7 @@ test('use the code that will go on chain to start the contract', async t => {
const instance = await sync.instance.promise;

// Now that we have the instance, resume testing as above.
const { feeMintAccess, bundleCache } = /** @type {TestContext} */ (t.context);
const { feeMintAccess, bundleCache } = t.context;
const { faucet } = makeStableFaucet({ bundleCache, feeMintAccess, zoe });
await alice(t, zoe, instance, await faucet(5n * UNIT6));
});

0 comments on commit 288727b

Please sign in to comment.