aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/test/unit
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-16 20:38:27 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-07-16 20:38:27 +0800
commitacff177c547dee049b97e4b051fe22e1efaf992c (patch)
tree4580187592aac7695c1edae15a6f68eea5b1078c /packages/subproviders/test/unit
parentffeb3194a8f5e68c266f0bc6c70c6c9ba0754ec6 (diff)
parent6bdee26c3037733ad198d54c1e88f3c7647ad230 (diff)
downloaddexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar
dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar.gz
dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar.bz2
dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar.lz
dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar.xz
dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.tar.zst
dexon-sol-tools-acff177c547dee049b97e4b051fe22e1efaf992c.zip
Merge branch 'v2-prototype' into feature/order-watcher-v2
Diffstat (limited to 'packages/subproviders/test/unit')
-rw-r--r--packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/ledger_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts8
6 files changed, 7 insertions, 16 deletions
diff --git a/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts b/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts
index f17c21f02..063817a95 100644
--- a/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts
+++ b/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts
@@ -2,9 +2,8 @@ import * as chai from 'chai';
import * as lightwallet from 'eth-lightwallet';
import { JSONRPCResponsePayload } from 'ethereum-types';
import * as ethUtils from 'ethereumjs-util';
-import Web3ProviderEngine = require('web3-provider-engine');
-import { EthLightwalletSubprovider } from '../../src';
+import { EthLightwalletSubprovider, Web3ProviderEngine } from '../../src';
import { DoneCallback } from '../../src/types';
import { chaiSetup } from '../chai_setup';
import { fixtureData } from '../utils/fixture_data';
diff --git a/packages/subproviders/test/unit/ledger_subprovider_test.ts b/packages/subproviders/test/unit/ledger_subprovider_test.ts
index 3b57e125b..edff5144e 100644
--- a/packages/subproviders/test/unit/ledger_subprovider_test.ts
+++ b/packages/subproviders/test/unit/ledger_subprovider_test.ts
@@ -2,9 +2,8 @@ import * as chai from 'chai';
import { JSONRPCResponsePayload } from 'ethereum-types';
import * as ethUtils from 'ethereumjs-util';
import * as _ from 'lodash';
-import Web3ProviderEngine = require('web3-provider-engine');
-import { LedgerSubprovider } from '../../src';
+import { LedgerSubprovider, Web3ProviderEngine } from '../../src';
import {
DoneCallback,
LedgerCommunicationClient,
diff --git a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
index 51ba7094c..f2bdda3cd 100644
--- a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
+++ b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
@@ -1,9 +1,8 @@
import * as chai from 'chai';
import { JSONRPCResponsePayload } from 'ethereum-types';
import * as ethUtils from 'ethereumjs-util';
-import Web3ProviderEngine = require('web3-provider-engine');
-import { GanacheSubprovider, MnemonicWalletSubprovider } from '../../src/';
+import { GanacheSubprovider, MnemonicWalletSubprovider, Web3ProviderEngine } from '../../src/';
import { DoneCallback, WalletSubproviderErrors } from '../../src/types';
import { chaiSetup } from '../chai_setup';
import { fixtureData } from '../utils/fixture_data';
diff --git a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
index fa33cd50a..c437d0815 100644
--- a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
+++ b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
@@ -1,11 +1,10 @@
import * as chai from 'chai';
-import Web3ProviderEngine = require('web3-provider-engine');
import FixtureSubprovider = require('web3-provider-engine/subproviders/fixture');
import { promisify } from '@0xproject/utils';
import EthereumTx = require('ethereumjs-tx');
-import { NonceTrackerSubprovider } from '../../src';
+import { NonceTrackerSubprovider, Web3ProviderEngine } from '../../src';
import { chaiSetup } from '../chai_setup';
const expect = chai.expect;
diff --git a/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts b/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts
index ab321bcff..95773145f 100644
--- a/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts
+++ b/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts
@@ -1,9 +1,8 @@
import * as chai from 'chai';
import { JSONRPCResponsePayload } from 'ethereum-types';
import * as ethUtils from 'ethereumjs-util';
-import Web3ProviderEngine = require('web3-provider-engine');
-import { GanacheSubprovider, PrivateKeyWalletSubprovider } from '../../src/';
+import { GanacheSubprovider, PrivateKeyWalletSubprovider, Web3ProviderEngine } from '../../src/';
import { DoneCallback, WalletSubproviderErrors } from '../../src/types';
import { chaiSetup } from '../chai_setup';
import { fixtureData } from '../utils/fixture_data';
diff --git a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts
index 810fb8f45..e30d2f74e 100644
--- a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts
+++ b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts
@@ -2,10 +2,8 @@ import { DoneCallback } from '@0xproject/types';
import * as chai from 'chai';
import { JSONRPCResponsePayload } from 'ethereum-types';
import * as Sinon from 'sinon';
-import Web3ProviderEngine = require('web3-provider-engine');
-import RpcSubprovider = require('web3-provider-engine/subproviders/rpc');
-import { RedundantSubprovider } from '../../src';
+import { RedundantSubprovider, RPCSubprovider, Web3ProviderEngine } from '../../src';
import { Subprovider } from '../../src/subproviders/subprovider';
import { chaiSetup } from '../chai_setup';
import { ganacheSubprovider } from '../utils/ganache_subprovider';
@@ -39,9 +37,7 @@ describe('RedundantSubprovider', () => {
});
it('succeeds when supplied at least one healthy endpoint', (done: DoneCallback) => {
provider = new Web3ProviderEngine();
- const nonExistentSubprovider = new RpcSubprovider({
- rpcUrl: 'http://does-not-exist:3000',
- });
+ const nonExistentSubprovider = new RPCSubprovider('http://does-not-exist:3000');
const handleRequestStub = Sinon.stub(nonExistentSubprovider, 'handleRequest').throws(
new Error('REQUEST_FAILED'),
);