From 4214994baf5d127ed78f00eb9a0162e162ef74c4 Mon Sep 17 00:00:00 2001 From: Sigmund Date: Thu, 19 Sep 2024 19:42:21 +0300 Subject: [PATCH] test: Fix controller hardhat unit tests (#374) --- hardhat/test/controller.ts | 2 +- hardhat/test/fixtures.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hardhat/test/controller.ts b/hardhat/test/controller.ts index 8724d666..74e4a9d7 100644 --- a/hardhat/test/controller.ts +++ b/hardhat/test/controller.ts @@ -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, diff --git a/hardhat/test/fixtures.ts b/hardhat/test/fixtures.ts index 603970e9..04f4aa22 100644 --- a/hardhat/test/fixtures.ts +++ b/hardhat/test/fixtures.ts @@ -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', signer) await controller .connect(signer) - .initialize(storageAddress, usersAddress, paymentsAddress, mediationAddress, jobCreatorAddress) + .initialize(storageAddress, usersAddress, paymentsAddress, mediationAddress, jobCreatorAddress, powAddress) return controller } @@ -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') @@ -283,7 +285,8 @@ export async function setupControllerFixture({ usersAddress, paymentsAddress, mediationAddress, - jobCreator + jobCreator, + powAddress ) const controllerAddress = await controller.getAddress() await (payments as any)