Skip to content

Commit

Permalink
test: alter place of .toThrow() expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
iluxonchik committed Apr 3, 2024
1 parent 715ecef commit 2d5781a
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/tests/RandoMina.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,9 @@ describe('RandoMina Random Number Generator', () => {
expect(isPRNGCorrect).toBe(true);

console.log("Posting proof to blockchain...");
const txn: Mina.Transaction = await Mina.transaction({ sender: feePayerPublicKey, fee: transactionFee }, () => {

await expect(Mina.transaction({ sender: feePayerPublicKey, fee: transactionFee }, () => {
zkAppInstance.verifyRandomNumber(randomNumberGenerationObservation);
});

console.log("\tProving smart contract invocation...");
await txn.prove();
console.log("\tSmart contract invocation proved!");

txn.sign([feePayer]);

await expect(txn.send()).rejects.toThrow(/Protocol_state_precondition_unsatisfied/);
})).rejects.toThrow();
});
});

0 comments on commit 2d5781a

Please sign in to comment.