Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpar committed Apr 9, 2024
1 parent ca0891b commit 74c8cc8
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions core/test/MezoAllocator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ describe("MezoAllocator", () => {
it("should revert", async () => {
await expect(
mezoAllocator.connect(thirdParty).addMaintainer(depositor.address),
).to.be.revertedWithCustomError(mezoAllocator, "OwnableUnauthorizedAccount")
).to.be.revertedWithCustomError(
mezoAllocator,
"OwnableUnauthorizedAccount",
)
})
})

Expand Down Expand Up @@ -299,13 +302,19 @@ describe("MezoAllocator", () => {

it("should add a new maintainer to the list", async () => {
const maintainers = await mezoAllocator.getMaintainers()
expect(maintainers).to.deep.equal([maintainer.address, thirdParty.address])
expect(maintainers).to.deep.equal([
maintainer.address,
thirdParty.address,
])
})

it("should not allow to add the same maintainer twice", async () => {
await expect(
mezoAllocator.connect(governance).addMaintainer(thirdParty.address),
).to.be.revertedWithCustomError(mezoAllocator, "MaintainerAlreadyRegistered")
).to.be.revertedWithCustomError(
mezoAllocator,
"MaintainerAlreadyRegistered",
)
})

it("should not allow to add a zero address as a maintainer", async () => {
Expand All @@ -324,7 +333,10 @@ describe("MezoAllocator", () => {
it("should revert", async () => {
await expect(
mezoAllocator.connect(thirdParty).removeMaintainer(depositor.address),
).to.be.revertedWithCustomError(mezoAllocator, "OwnableUnauthorizedAccount")
).to.be.revertedWithCustomError(
mezoAllocator,
"OwnableUnauthorizedAccount",
)
})
})

Expand All @@ -333,7 +345,9 @@ describe("MezoAllocator", () => {
let tx: ContractTransactionResponse

before(async () => {
await mezoAllocator.connect(governance).addMaintainer(thirdParty.address)
await mezoAllocator
.connect(governance)
.addMaintainer(thirdParty.address)
tx = await mezoAllocator
.connect(governance)
.removeMaintainer(thirdParty.address)
Expand All @@ -358,8 +372,13 @@ describe("MezoAllocator", () => {

it("should not allow to remove a maintainer twice", async () => {
await expect(
mezoAllocator.connect(governance).removeMaintainer(thirdParty.address),
).to.be.revertedWithCustomError(mezoAllocator, "MaintainerNotRegistered")
mezoAllocator
.connect(governance)
.removeMaintainer(thirdParty.address),
).to.be.revertedWithCustomError(
mezoAllocator,
"MaintainerNotRegistered",
)
})
})
})
Expand Down

0 comments on commit 74c8cc8

Please sign in to comment.