Skip to content

Commit

Permalink
test: Fix controller hardhat unit tests (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmundxyz authored Sep 19, 2024
1 parent 90aea69 commit 4214994
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hardhat/test/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const { expect } = chai

// https://ethereum.stackexchange.com/questions/86633/time-dependent-tests-with-hardhat

describe.skip("Controller", () => {
describe("Controller", () => {
const {
instructionPrice,
instructionCount,
Expand Down
9 changes: 6 additions & 3 deletions hardhat/test/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,13 @@ export async function deployController(
usersAddress: AddressLike,
paymentsAddress: AddressLike,
mediationAddress: AddressLike,
jobCreatorAddress: AddressLike
jobCreatorAddress: AddressLike,
powAddress: AddressLike
) {
const controller = await deployContract<LilypadController>('LilypadController', signer)
await controller
.connect(signer)
.initialize(storageAddress, usersAddress, paymentsAddress, mediationAddress, jobCreatorAddress)
.initialize(storageAddress, usersAddress, paymentsAddress, mediationAddress, jobCreatorAddress, powAddress)
return controller
}

Expand Down Expand Up @@ -274,6 +275,7 @@ export async function setupControllerFixture({
const storageAddress = await storage.getAddress()
const usersAddress = await users.getAddress()
const mediationAddress = await mediation.getAddress()
const powAddress = await payments.getAddress()

const jobCreator = getWallet('job_creator')

Expand All @@ -283,7 +285,8 @@ export async function setupControllerFixture({
usersAddress,
paymentsAddress,
mediationAddress,
jobCreator
jobCreator,
powAddress
)
const controllerAddress = await controller.getAddress()
await (payments as any)
Expand Down

0 comments on commit 4214994

Please sign in to comment.