aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test/token_wrapper_test.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-03-05 11:05:26 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-03-12 10:37:27 +0800
commit13299158d1e22d1af1cd36434fc403a74743ecb1 (patch)
tree9b35435c6f8641d2dc3d7bfd530c7c4f040a1f51 /packages/0x.js/test/token_wrapper_test.ts
parenta6571b09d2087ffb9a4860c0db3d7344321fe2c3 (diff)
downloaddexon-0x-contracts-13299158d1e22d1af1cd36434fc403a74743ecb1.tar.gz
dexon-0x-contracts-13299158d1e22d1af1cd36434fc403a74743ecb1.tar.zst
dexon-0x-contracts-13299158d1e22d1af1cd36434fc403a74743ecb1.zip
Add sol-cover implementation
Diffstat (limited to 'packages/0x.js/test/token_wrapper_test.ts')
-rw-r--r--packages/0x.js/test/token_wrapper_test.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts
index 070d6ec47..c562a4aac 100644
--- a/packages/0x.js/test/token_wrapper_test.ts
+++ b/packages/0x.js/test/token_wrapper_test.ts
@@ -25,10 +25,10 @@ import { TokenUtils } from './utils/token_utils';
chaiSetup.configure();
const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle();
+const web3 = web3Factory.create();
+const blockchainLifecycle = new BlockchainLifecycle(web3);
describe('TokenWrapper', () => {
- let web3: Web3;
let zeroEx: ZeroEx;
let userAddresses: string[];
let tokens: Token[];
@@ -40,7 +40,6 @@ describe('TokenWrapper', () => {
networkId: constants.TESTRPC_NETWORK_ID,
};
before(async () => {
- web3 = web3Factory.create();
zeroEx = new ZeroEx(web3.currentProvider, config);
web3Wrapper = new Web3Wrapper(web3.currentProvider);
userAddresses = await zeroEx.getAvailableAddressesAsync();
@@ -194,7 +193,7 @@ describe('TokenWrapper', () => {
let zeroExWithoutAccounts: ZeroEx;
before(async () => {
const hasAddresses = false;
- const web3WithoutAccounts = web3Factory.create(hasAddresses);
+ const web3WithoutAccounts = web3Factory.create({ hasAddresses });
zeroExWithoutAccounts = new ZeroEx(web3WithoutAccounts.currentProvider, config);
});
it('should return balance even when called with Web3 provider instance without addresses', async () => {
@@ -306,7 +305,7 @@ describe('TokenWrapper', () => {
let zeroExWithoutAccounts: ZeroEx;
before(async () => {
const hasAddresses = false;
- const web3WithoutAccounts = web3Factory.create(hasAddresses);
+ const web3WithoutAccounts = web3Factory.create({ hasAddresses });
zeroExWithoutAccounts = new ZeroEx(web3WithoutAccounts.currentProvider, config);
});
it('should get the proxy allowance', async () => {