Skip to content

Commit

Permalink
Fix template tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Lbqds committed Feb 29, 2024
1 parent 08b1a3f commit c3d803a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/cli/templates/base/test/token.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,13 @@ describe('integration tests', () => {
await signer.setSelectedAccount(testAddress)
const testGroup = account.group

const deployments = allDeployments.find((d) => groupOfAddress(d.deployerAddress) === testGroup)
if (deployments === undefined) {
const faucet = TokenFaucetInstance.in(allDeployments, testGroup)
if (faucet === undefined) {
console.log(`The contract is not deployed on group ${account.group}`)
continue
}
const deployed = deployments.contracts.TokenFaucet
expect(deployed.contractInstance.groupIndex).toEqual(testGroup)

const faucet = deployed.contractInstance as TokenFaucetInstance
expect(faucet.groupIndex).toEqual(testGroup)
const initialState = await faucet.fetchState()
const initialBalance = initialState.fields.balance

Expand Down

0 comments on commit c3d803a

Please sign in to comment.