diff --git a/yarn-project/end-to-end/src/e2e_private_voting_contract.test.ts b/yarn-project/end-to-end/src/e2e_private_voting_contract.test.ts index 72b655446c0a..c1946457260a 100644 --- a/yarn-project/end-to-end/src/e2e_private_voting_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_private_voting_contract.test.ts @@ -46,6 +46,9 @@ describe('e2e_voting_contract', () => { await wallet.rotateNullifierKeys(); await crossDelay(); + // We try simulating voting again, but our TX is invalid because it will emit duplicate nullifiers + await expect(votingContract.methods.cast_vote(candidate).simulate()).rejects.toThrow('The simulated transaction is unable to be added to state and is invalid.'); + // We try voting again, but our TX is dropped due to trying to emit duplicate nullifiers await expect(votingContract.methods.cast_vote(candidate).send().wait()).rejects.toThrow( 'Reason: Tx dropped by P2P node.',