From faf8e28be3be2b14b183051bff6c402196f9606d Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:10:39 +0800 Subject: [PATCH] update test script, add event of itemsoleout check --- test/testGameItemMall.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/testGameItemMall.ts b/test/testGameItemMall.ts index 35587d7..5702bc7 100644 --- a/test/testGameItemMall.ts +++ b/test/testGameItemMall.ts @@ -78,7 +78,9 @@ describe('GameItemMall', function() { ) */ //@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); });