From 709026bf1a49d468850b4ebed845c8598fa4fd75 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 19 Jan 2018 15:34:28 +0100 Subject: Refactor contracts tests to not use injected web3 instance --- packages/0x.js/test/ether_token_wrapper_test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'packages/0x.js/test/ether_token_wrapper_test.ts') diff --git a/packages/0x.js/test/ether_token_wrapper_test.ts b/packages/0x.js/test/ether_token_wrapper_test.ts index b810fc9f1..e0f18f26f 100644 --- a/packages/0x.js/test/ether_token_wrapper_test.ts +++ b/packages/0x.js/test/ether_token_wrapper_test.ts @@ -1,4 +1,4 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; +import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import 'mocha'; @@ -24,11 +24,10 @@ import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; import { reportNodeCallbackErrors } from './utils/report_callback_errors'; import { TokenUtils } from './utils/token_utils'; -import { web3Factory } from './utils/web3_factory'; chaiSetup.configure(); const expect = chai.expect; -const blockchainLifecycle = new BlockchainLifecycle(constants.RPC_URL); +const blockchainLifecycle = new BlockchainLifecycle(devConstants.RPC_URL); // Since the address depositing/withdrawing ETH/WETH also needs to pay gas costs for the transaction, // a small amount of ETH will be used to pay this gas cost. We therefore check that the difference between -- cgit v1.2.3 From 6205209fbbb5dbebbf225e1cef76c3e86117d356 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 30 Jan 2018 14:03:54 +0100 Subject: Make an RPC constructor param implicit --- packages/0x.js/test/ether_token_wrapper_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/0x.js/test/ether_token_wrapper_test.ts') diff --git a/packages/0x.js/test/ether_token_wrapper_test.ts b/packages/0x.js/test/ether_token_wrapper_test.ts index e0f18f26f..6069b42bf 100644 --- a/packages/0x.js/test/ether_token_wrapper_test.ts +++ b/packages/0x.js/test/ether_token_wrapper_test.ts @@ -27,7 +27,7 @@ import { TokenUtils } from './utils/token_utils'; chaiSetup.configure(); const expect = chai.expect; -const blockchainLifecycle = new BlockchainLifecycle(devConstants.RPC_URL); +const blockchainLifecycle = new BlockchainLifecycle(); // Since the address depositing/withdrawing ETH/WETH also needs to pay gas costs for the transaction, // a small amount of ETH will be used to pay this gas cost. We therefore check that the difference between -- cgit v1.2.3 From 7cc4a8f5cebb41ee5b9a37a1732d7f2af5d16d4a Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 30 Jan 2018 16:26:42 -0800 Subject: Fix lint errors --- packages/0x.js/test/ether_token_wrapper_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/0x.js/test/ether_token_wrapper_test.ts') diff --git a/packages/0x.js/test/ether_token_wrapper_test.ts b/packages/0x.js/test/ether_token_wrapper_test.ts index 6069b42bf..9716abab8 100644 --- a/packages/0x.js/test/ether_token_wrapper_test.ts +++ b/packages/0x.js/test/ether_token_wrapper_test.ts @@ -144,7 +144,7 @@ describe('EtherTokenWrapper', () => { etherTokenAddress = etherToken.address; }); afterEach(() => { - zeroEx.etherToken.unsubscribeAll(); + zeroEx.etherToken._unsubscribeAll(); }); // Hack: Mocha does not allow a test to be both async and have a `done` callback // Since we need to await the receipt of the event in the `subscribe` callback, -- cgit v1.2.3