Skip to content

Commit b67c641

Browse files
committed
fix tests
1 parent 9399f5b commit b67c641

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

test/governance/Governor.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async function deployToken(contractName) {
4040
}
4141
}
4242

43-
describe('Governor', function () {
43+
describe.only('Governor', function () {
4444
for (const { Token, mode } of TOKENS) {
4545
const fixture = async () => {
4646
const [owner, proposer, voter1, voter2, voter3, voter4, userEOA] = await ethers.getSigners();
@@ -625,7 +625,7 @@ describe('Governor', function () {
625625

626626
await expect(this.helper.connect(this.owner).cancel('external'))
627627
.to.be.revertedWithCustomError(this.mock, 'GovernorUnableToCancel')
628-
.withArgs(this.proposal.id, this.owner.address);
628+
.withArgs(this.proposal.id, this.owner);
629629
});
630630

631631
it('after vote started', async function () {
@@ -634,7 +634,7 @@ describe('Governor', function () {
634634

635635
await expect(this.helper.cancel('external'))
636636
.to.be.revertedWithCustomError(this.mock, 'GovernorUnableToCancel')
637-
.withArgs(this.proposal.id, this.owner.address);
637+
.withArgs(this.proposal.id, this.owner);
638638
});
639639

640640
it('after vote', async function () {
@@ -644,7 +644,7 @@ describe('Governor', function () {
644644

645645
await expect(this.helper.cancel('external'))
646646
.to.be.revertedWithCustomError(this.mock, 'GovernorUnableToCancel')
647-
.withArgs(this.proposal.id, this.voter1.address);
647+
.withArgs(this.proposal.id, this.voter1);
648648
});
649649

650650
it('after deadline', async function () {
@@ -655,7 +655,7 @@ describe('Governor', function () {
655655

656656
await expect(this.helper.cancel('external'))
657657
.to.be.revertedWithCustomError(this.mock, 'GovernorUnableToCancel')
658-
.withArgs(this.proposal.id, this.voter1.address);
658+
.withArgs(this.proposal.id, this.voter1);
659659
});
660660

661661
it('after execution', async function () {
@@ -667,7 +667,7 @@ describe('Governor', function () {
667667

668668
await expect(this.helper.cancel('external'))
669669
.to.be.revertedWithCustomError(this.mock, 'GovernorUnableToCancel')
670-
.withArgs(this.proposal.id, this.voter1.address);
670+
.withArgs(this.proposal.id, this.voter1);
671671
});
672672
});
673673
});

test/governance/extensions/GovernorProposalGuardian.test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,8 @@ describe('GovernorProposalGuardian', function () {
104104

105105
it('from proposer when proposal guardian is non-zero', async function () {
106106
await expect(this.helper.connect(this.proposer).cancel())
107-
.to.be.revertedWithCustomError(this.mock, 'GovernorUnexpectedProposalState')
108-
.withArgs(
109-
this.proposal.id,
110-
ProposalState.Active,
111-
GovernorHelper.proposalStatesToBitMap([ProposalState.Pending]),
112-
);
107+
.to.be.revertedWithCustomError(this.mock, 'GovernorUnableToCancel')
108+
.withArgs(this.proposal.id, this.proposer);
113109
});
114110

115111
it('from proposer when proposal guardian is zero', async function () {

0 commit comments

Comments
 (0)