update test script, add event of itemsoleout check

This commit is contained in:
CounterFire2023 2024-07-24 16:10:39 +08:00
parent a716a86f23
commit faf8e28be3

View File

@ -78,7 +78,9 @@ describe('GameItemMall', function() {
) )
*/ */
//@ts-ignore //@ts-ignore
await mall.connect(otherAccount).buy(otherAccount.address, orderId, ft.target, amount, now, nonce, signature); await expect(mall.connect(otherAccount).buy(otherAccount.address, orderId, ft.target, amount, now, nonce, signature))
.to.emit(mall, "ItemSoldOut")
.withArgs(otherAccount.address, otherAccount.address, orderId, ft.target, amount);
expect(await ft.balanceOf(otherAccount.address)).to.equal(900); expect(await ft.balanceOf(otherAccount.address)).to.equal(900);
}); });