Skip to content

Commit f0443c5

Browse files
authored
Fixed promises that were not resolving on time (#112)
1 parent 485c99a commit f0443c5

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

test/finance/vesting/Vesting.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,11 @@ describe("Vesting", () => {
162162
vestingAmount: vestingAmount * 2n,
163163
};
164164

165-
const linearTx = vesting.createVesting(linearVesting);
166-
const exponentialTx = vesting.createVesting(exponentialVesting);
167-
168-
await expect(linearTx)
165+
await expect(vesting.createVesting(linearVesting))
169166
.to.emit(vesting, "VestingCreated")
170167
.withArgs(1, linearVesting.beneficiary, linearVesting.vestingToken);
171168

172-
await expect(exponentialTx)
169+
await expect(vesting.createVesting(exponentialVesting))
173170
.to.emit(vesting, "VestingCreated")
174171
.withArgs(2, exponentialVesting.beneficiary, exponentialVesting.vestingToken);
175172

test/libs/data-structures/SparseMerkleTree.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@ describe("SparseMerkleTree", () => {
282282
await merkleTree.addUint(hexKey, key);
283283
}
284284

285-
expect(merkleTree.removeUint(ethers.toBeHex(8, 32))).to.be.revertedWith(
285+
await expect(merkleTree.removeUint(ethers.toBeHex(8, 32))).to.be.revertedWith(
286286
"SparseMerkleTree: the node does not exist",
287287
);
288-
expect(merkleTree.removeUint(ethers.toBeHex(9, 32))).to.be.revertedWith(
288+
await expect(merkleTree.removeUint(ethers.toBeHex(9, 32))).to.be.revertedWith(
289289
"SparseMerkleTree: the leaf does not match",
290290
);
291291
});
@@ -328,10 +328,10 @@ describe("SparseMerkleTree", () => {
328328
await merkleTree.addUint(hexKey, key);
329329
}
330330

331-
expect(merkleTree.updateUint(ethers.toBeHex(8, 32), 1n)).to.be.revertedWith(
331+
await expect(merkleTree.updateUint(ethers.toBeHex(8, 32), 1n)).to.be.revertedWith(
332332
"SparseMerkleTree: the node does not exist",
333333
);
334-
expect(merkleTree.updateUint(ethers.toBeHex(9, 32), 1n)).to.be.revertedWith(
334+
await expect(merkleTree.updateUint(ethers.toBeHex(9, 32), 1n)).to.be.revertedWith(
335335
"SparseMerkleTree: the leaf does not match",
336336
);
337337
});

0 commit comments

Comments
 (0)