From 5f15b8804ab782273153f220f506b1562cd82a3d Mon Sep 17 00:00:00 2001 From: Fraz Arshad Date: Mon, 21 Oct 2024 21:41:54 +0500 Subject: [PATCH] fixup! test(a3p): create a3p test for replace electorate core eval chore: following ocap principles --- a3p-integration/proposals/z:acceptance/governance.test.js | 6 +++++- a3p-integration/proposals/z:acceptance/test-lib/index.js | 7 ------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/a3p-integration/proposals/z:acceptance/governance.test.js b/a3p-integration/proposals/z:acceptance/governance.test.js index ef8754c8dfe2..36b0679cf316 100644 --- a/a3p-integration/proposals/z:acceptance/governance.test.js +++ b/a3p-integration/proposals/z:acceptance/governance.test.js @@ -1,8 +1,11 @@ +/* global fetch */ + import test from 'ava'; import '@endo/init'; import { GOV1ADDR, GOV2ADDR, GOV3ADDR } from '@agoric/synthetic-chain'; -import { governanceDriver, walletUtils, waitUntil } from './test-lib/index.js'; +import { walletUtils, waitUntil, networkConfig } from './test-lib/index.js'; import { getLastUpdate } from './test-lib/wallet.js'; +import { makeGovernanceDriver } from './test-lib/governance.js'; const governanceAddresses = [GOV1ADDR, GOV2ADDR, GOV3ADDR]; @@ -10,6 +13,7 @@ test.serial( 'economic committee can make governance proposal and vote on it', async t => { const { readLatestHead } = walletUtils; + const governanceDriver = await makeGovernanceDriver(fetch, networkConfig); /** @type {any} */ const instance = await readLatestHead(`published.agoricNames.instance`); diff --git a/a3p-integration/proposals/z:acceptance/test-lib/index.js b/a3p-integration/proposals/z:acceptance/test-lib/index.js index 0284a5953be3..5d5e739ce593 100644 --- a/a3p-integration/proposals/z:acceptance/test-lib/index.js +++ b/a3p-integration/proposals/z:acceptance/test-lib/index.js @@ -1,7 +1,6 @@ /* global fetch setTimeout */ import { execFileSync } from 'child_process'; import { makeWalletUtils } from './wallet.js'; -import { makeGovernanceDriver } from './governance.js'; export const networkConfig = { rpcAddrs: ['http://0.0.0.0:26657'], @@ -22,12 +21,6 @@ export const walletUtils = await makeWalletUtils( networkConfig, ); -// eslint-disable-next-line @jessie.js/safe-await-separator -- buggy version -export const governanceDriver = await makeGovernanceDriver( - fetch, - networkConfig, -); - export const waitUntil = async timestamp => { const timeDelta = Math.floor(Date.now() / 1000) - Number(timestamp); await delay(timeDelta);