From 75a51af00603236e0b80fe04336494944a32739c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 6 Apr 2018 15:04:17 +0900 Subject: Use provider over web3 in deployer, dev-utils and subprovider tests, rename subprovider to ganacheSubprovider in test util --- .../subproviders/test/unit/ledger_subprovider_test.ts | 2 +- .../test/unit/redundant_rpc_subprovider_test.ts | 2 +- .../subproviders/test/utils/ganache_subprovider.ts | 18 ++++++++++++++++++ packages/subproviders/test/utils/subprovider.ts | 18 ------------------ 4 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 packages/subproviders/test/utils/ganache_subprovider.ts delete mode 100644 packages/subproviders/test/utils/subprovider.ts (limited to 'packages/subproviders/test') diff --git a/packages/subproviders/test/unit/ledger_subprovider_test.ts b/packages/subproviders/test/unit/ledger_subprovider_test.ts index a3800434a..d30c68f65 100644 --- a/packages/subproviders/test/unit/ledger_subprovider_test.ts +++ b/packages/subproviders/test/unit/ledger_subprovider_test.ts @@ -8,8 +8,8 @@ import Web3ProviderEngine = require('web3-provider-engine'); import { LedgerSubprovider } from '../../src'; import { DoneCallback, LedgerCommunicationClient, LedgerSubproviderErrors } from '../../src/types'; import { chaiSetup } from '../chai_setup'; +import { ganacheSubprovider } from '../utils/ganache_subprovider'; import { reportCallbackErrors } from '../utils/report_callback_errors'; -import { subprovider as ganacheSubprovider } from '../utils/subprovider'; chaiSetup.configure(); const expect = chai.expect; diff --git a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts index ab540e202..e7ca6d496 100644 --- a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts +++ b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts @@ -8,8 +8,8 @@ import RpcSubprovider = require('web3-provider-engine/subproviders/rpc'); import { RedundantRPCSubprovider } from '../../src'; import { DoneCallback } from '../../src/types'; import { chaiSetup } from '../chai_setup'; +import { ganacheSubprovider } from '../utils/ganache_subprovider'; import { reportCallbackErrors } from '../utils/report_callback_errors'; -import { subprovider as ganacheSubprovider } from '../utils/subprovider'; const expect = chai.expect; chaiSetup.configure(); diff --git a/packages/subproviders/test/utils/ganache_subprovider.ts b/packages/subproviders/test/utils/ganache_subprovider.ts new file mode 100644 index 000000000..ac4a9325c --- /dev/null +++ b/packages/subproviders/test/utils/ganache_subprovider.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; + +import { GanacheSubprovider } from '../../src/subproviders/ganache'; +import { configs } from '../utils/configs'; + +const logger = { + log: (arg: any) => { + fs.appendFileSync('ganache.log', `${arg}\n`); + }, +}; + +export const ganacheSubprovider = new GanacheSubprovider({ + logger, + verbose: false, + port: configs.port, + networkId: configs.networkId, + mnemonic: configs.mnemonic, +}); diff --git a/packages/subproviders/test/utils/subprovider.ts b/packages/subproviders/test/utils/subprovider.ts deleted file mode 100644 index b1c459746..000000000 --- a/packages/subproviders/test/utils/subprovider.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as fs from 'fs'; - -import { GanacheSubprovider } from '../../src/subproviders/ganache'; -import { configs } from '../utils/configs'; - -const logger = { - log: (arg: any) => { - fs.appendFileSync('ganache.log', `${arg}\n`); - }, -}; - -export const subprovider = new GanacheSubprovider({ - logger, - verbose: false, - port: configs.port, - networkId: configs.networkId, - mnemonic: configs.mnemonic, -}); -- cgit v1.2.3