aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test/subscription_test.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-16 02:37:03 +0800
committerFabio Berger <me@fabioberger.com>2017-12-16 02:37:03 +0800
commitb46dd2e0a277340c19fa137a436981cc53c8cb80 (patch)
treed2814176fe8ffc5ec6a61534aa77487aae6bcc13 /packages/0x.js/test/subscription_test.ts
parent484dd4c33aa5786def1f0b159f5b51f99a585aa8 (diff)
parent3eb08735d4d0fe4b046dd6b74f5ed503cf5c64e3 (diff)
downloaddexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar.gz
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar.bz2
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar.lz
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar.xz
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.tar.zst
dexon-sol-tools-b46dd2e0a277340c19fa137a436981cc53c8cb80.zip
Merge branch 'development' into createWethPage
* development: (54 commits) Fix redundant spaces Fix tests Fix website unused vars Fix connect unused vars Fix 0x.js unused vars Dissallow unused vars/imports Implement first custom linter rule async-suffix Reuse intervalutils in website Add a newline Name a variable Add a comment Fix a conditional Make migrations deterministic Fix linter error Fix linter errors Add a function to init token balances Rename tokenUtils.getNonProtocolTokens to tokenUtils.getDummyTokens Add DummyToken to gitignore Add DummyToken to artifacts list Increase mocha timeout ...
Diffstat (limited to 'packages/0x.js/test/subscription_test.ts')
-rw-r--r--packages/0x.js/test/subscription_test.ts12
1 files changed, 3 insertions, 9 deletions
diff --git a/packages/0x.js/test/subscription_test.ts b/packages/0x.js/test/subscription_test.ts
index 3aeeaa109..43e6b63b6 100644
--- a/packages/0x.js/test/subscription_test.ts
+++ b/packages/0x.js/test/subscription_test.ts
@@ -1,3 +1,4 @@
+import {BlockchainLifecycle} from '@0xproject/dev-utils';
import BigNumber from 'bignumber.js';
import * as chai from 'chai';
import * as _ from 'lodash';
@@ -11,27 +12,23 @@ import {
Token,
TokenEvents,
ZeroEx,
- ZeroExError,
} from '../src';
-import {BlockParamLiteral, DoneCallback} from '../src/types';
+import {DoneCallback} from '../src/types';
-import {BlockchainLifecycle} from './utils/blockchain_lifecycle';
import {chaiSetup} from './utils/chai_setup';
import {constants} from './utils/constants';
import {reportCallbackErrors} 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();
+const blockchainLifecycle = new BlockchainLifecycle(constants.RPC_URL);
describe('SubscriptionTest', () => {
let web3: Web3;
let zeroEx: ZeroEx;
let userAddresses: string[];
let tokens: Token[];
- let tokenUtils: TokenUtils;
let coinbase: string;
let addressWithoutFunds: string;
const config = {
@@ -42,7 +39,6 @@ describe('SubscriptionTest', () => {
zeroEx = new ZeroEx(web3.currentProvider, config);
userAddresses = await zeroEx.getAvailableAddressesAsync();
tokens = await zeroEx.tokenRegistry.getTokensAsync();
- tokenUtils = new TokenUtils(tokens);
coinbase = userAddresses[0];
addressWithoutFunds = userAddresses[1];
});
@@ -54,9 +50,7 @@ describe('SubscriptionTest', () => {
});
describe('#subscribe', () => {
const indexFilterValues = {};
- const shouldThrowOnInsufficientBalanceOrAllowance = true;
let tokenAddress: string;
- const transferAmount = new BigNumber(42);
const allowanceAmount = new BigNumber(42);
let stubs: Sinon.SinonStub[] = [];
before(() => {