Remove async from describe blocks and add missing await in tests (#4942)

Co-authored-by: ernestognw <ernestognw@gmail.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
Franco Victorio
2024-03-14 17:35:08 +01:00
committed by GitHub
parent 33ea1111b0
commit c03952acbe
13 changed files with 64 additions and 59 deletions

View File

@ -171,7 +171,7 @@ describe('TimelockController', function () {
MINDELAY,
);
expect(tx)
await expect(tx)
.to.emit(this.mock, 'CallScheduled')
.withArgs(
this.operation.id,
@ -698,7 +698,7 @@ describe('TimelockController', function () {
this.operation.salt,
);
for (const i in this.operation.targets) {
expect(tx)
await expect(tx)
.to.emit(this.mock, 'CallExecuted')
.withArgs(
this.operation.id,
@ -843,7 +843,7 @@ describe('TimelockController', function () {
nonReentrantBatchOperation.salt,
);
for (const i in nonReentrantBatchOperation.targets) {
expect(tx)
await expect(tx)
.to.emit(this.mock, 'CallExecuted')
.withArgs(
nonReentrantBatchOperation.id,

View File

@ -370,7 +370,7 @@ describe('GovernorTimelockAccess', function () {
if (await this.mock.proposalNeedsQueuing(this.proposal.id)) {
expect(await this.helper.queue())
.to.emit(this.mock, 'ProposalQueued')
.withArgs(this.proposal.id);
.withArgs(this.proposal.id, anyValue);
}
if (delay > 0) {
await this.helper.waitForEta();
@ -378,7 +378,7 @@ describe('GovernorTimelockAccess', function () {
expect(await this.helper.execute())
.to.emit(this.mock, 'ProposalExecuted')
.withArgs(this.proposal.id)
.to.not.emit(this.receiver, 'CalledUnrestricted');
.to.emit(this.receiver, 'CalledUnrestricted');
});
}
});