diff --git a/test/finance/vesting/Vesting.test.ts b/test/finance/vesting/Vesting.test.ts index 726ddeaa..a8518853 100644 --- a/test/finance/vesting/Vesting.test.ts +++ b/test/finance/vesting/Vesting.test.ts @@ -162,14 +162,11 @@ describe("Vesting", () => { vestingAmount: vestingAmount * 2n, }; - const linearTx = vesting.createVesting(linearVesting); - const exponentialTx = vesting.createVesting(exponentialVesting); - - await expect(linearTx) + await expect(vesting.createVesting(linearVesting)) .to.emit(vesting, "VestingCreated") .withArgs(1, linearVesting.beneficiary, linearVesting.vestingToken); - await expect(exponentialTx) + await expect(vesting.createVesting(exponentialVesting)) .to.emit(vesting, "VestingCreated") .withArgs(2, exponentialVesting.beneficiary, exponentialVesting.vestingToken); diff --git a/test/libs/data-structures/SparseMerkleTree.test.ts b/test/libs/data-structures/SparseMerkleTree.test.ts index 9029c2a9..666deff8 100644 --- a/test/libs/data-structures/SparseMerkleTree.test.ts +++ b/test/libs/data-structures/SparseMerkleTree.test.ts @@ -282,10 +282,10 @@ describe("SparseMerkleTree", () => { await merkleTree.addUint(hexKey, key); } - expect(merkleTree.removeUint(ethers.toBeHex(8, 32))).to.be.revertedWith( + await expect(merkleTree.removeUint(ethers.toBeHex(8, 32))).to.be.revertedWith( "SparseMerkleTree: the node does not exist", ); - expect(merkleTree.removeUint(ethers.toBeHex(9, 32))).to.be.revertedWith( + await expect(merkleTree.removeUint(ethers.toBeHex(9, 32))).to.be.revertedWith( "SparseMerkleTree: the leaf does not match", ); }); @@ -328,10 +328,10 @@ describe("SparseMerkleTree", () => { await merkleTree.addUint(hexKey, key); } - expect(merkleTree.updateUint(ethers.toBeHex(8, 32), 1n)).to.be.revertedWith( + await expect(merkleTree.updateUint(ethers.toBeHex(8, 32), 1n)).to.be.revertedWith( "SparseMerkleTree: the node does not exist", ); - expect(merkleTree.updateUint(ethers.toBeHex(9, 32), 1n)).to.be.revertedWith( + await expect(merkleTree.updateUint(ethers.toBeHex(9, 32), 1n)).to.be.revertedWith( "SparseMerkleTree: the leaf does not match", ); });