From 7d78b5a2b9a11474178dad360a22761f6755bee7 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:42:01 -0500 Subject: [PATCH] await when checking logs --- test/token/ERC6909/ERC6909.behavior.js | 6 +++--- test/token/ERC6909/ERC6909.test.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/token/ERC6909/ERC6909.behavior.js b/test/token/ERC6909/ERC6909.behavior.js index 44e98311917..abc6b06ff68 100644 --- a/test/token/ERC6909/ERC6909.behavior.js +++ b/test/token/ERC6909/ERC6909.behavior.js @@ -45,7 +45,7 @@ function shouldBehaveLikeERC6909() { }); it('emits an an OperatorSet event', async function () { - expect(this.tx).to.emit(this.token, 'OperatorSet').withArgs(this.holder, this.operator, true); + await expect(this.tx).to.emit(this.token, 'OperatorSet').withArgs(this.holder, this.operator, true); }); it('should be reflected in isOperator call', async function () { @@ -67,7 +67,7 @@ function shouldBehaveLikeERC6909() { }); it('emits an Approval event', async function () { - expect(this.tx) + await expect(this.tx) .to.emit(this.token, 'Approval') .withArgs(this.holder, this.operator, firstTokenId, firstTokenAmount); }); @@ -135,7 +135,7 @@ function shouldBehaveLikeERC6909() { }); it('should emit transfer event', async function () { - expect(this.tx) + await expect(this.tx) .to.emit(this.token, 'Transfer') .withArgs(this.operator, this.alice, this.bruce, firstTokenId, firstTokenAmount - 1n); }); diff --git a/test/token/ERC6909/ERC6909.test.js b/test/token/ERC6909/ERC6909.test.js index 240b01df807..f2dc83afcf7 100644 --- a/test/token/ERC6909/ERC6909.test.js +++ b/test/token/ERC6909/ERC6909.test.js @@ -35,7 +35,7 @@ describe('ERC6909', function () { }); it('emits a Transfer event from 0 address', async function () { - expect(this.tx) + await expect(this.tx) .to.emit(this.token, 'Transfer') .withArgs(this.operator, ethers.ZeroAddress, this.holder, tokenId, mintValue); }); @@ -60,7 +60,7 @@ describe('ERC6909', function () { }); it('emits a Transfer event to 0 address', async function () { - expect(this.tx) + await expect(this.tx) .to.emit(this.token, 'Transfer') .withArgs(this.operator, this.holder, ethers.ZeroAddress, tokenId, burnValue); });