Skip to content

Commit

Permalink
Add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Feb 28, 2024
1 parent 59460ba commit 1113e77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions yarn-project/end-to-end/src/e2e_deploy_contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,16 @@ describe('e2e_deploy_contract', () => {
const owner = await registerRandomAccount(pxe);
const initArgs: StatefulContractCtorArgs = [owner, 42];
const contract = await registerContract(testWallet, StatefulTestContract, initArgs);
logger.info(`Calling the constructor for ${contract.address}`);
await contract.methods
.constructor(...initArgs)
.send()
.wait();
logger.info(`Checking if the constructor was run for ${contract.address}`);
expect(await contract.methods.summed_values(owner).view()).toEqual(42n);
logger.info(`Calling a function that requires initialization on ${contract.address}`);
await contract.methods.create_note(owner, 10).send().wait();
expect(await contract.methods.summed_values(owner).view()).toEqual(52n);
},
30_000,
);
Expand Down

0 comments on commit 1113e77

Please sign in to comment.