From 9778695b4ad1fd999eb79b01c768a2f2b9938917 Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 4 Jun 2018 19:48:21 -0700 Subject: Try enabling no-unused-variable... --- packages/0x.js/test/0x.js_test.ts | 7 +++---- packages/0x.js/test/artifacts_test.ts | 1 - packages/0x.js/test/global_hooks.ts | 2 -- packages/0x.js/test/utils/web3_wrapper.ts | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'packages/0x.js/test') diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts index 509d3f9f2..5d2eb6d7e 100644 --- a/packages/0x.js/test/0x.js_test.ts +++ b/packages/0x.js/test/0x.js_test.ts @@ -1,14 +1,12 @@ import { ContractWrappers } from '@0xproject/contract-wrappers'; -import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils'; +import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; import 'make-promises-safe'; import 'mocha'; -import * as path from 'path'; -import * as Sinon from 'sinon'; -import { ApprovalContractEventArgs, LogWithDecodedArgs, Order, TokenEvents, ZeroEx } from '../src'; +import { ApprovalContractEventArgs, LogWithDecodedArgs, TokenEvents, ZeroEx } from '../src'; import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; @@ -137,6 +135,7 @@ describe('ZeroEx library', () => { const proxyAddress = zeroEx.proxy.getContractAddress(); const txHash = await zeroEx.token.setUnlimitedProxyAllowanceAsync(zrxTokenAddress, coinbase); const txReceiptWithDecodedLogs = await zeroEx.awaitTransactionMinedAsync(txHash); + // tslint:disable-next-line:no-unnecessary-type-assertion const log = txReceiptWithDecodedLogs.logs[0] as LogWithDecodedArgs; expect(log.event).to.be.equal(TokenEvents.Approval); expect(log.args._owner).to.be.equal(coinbase); diff --git a/packages/0x.js/test/artifacts_test.ts b/packages/0x.js/test/artifacts_test.ts index 982fb8e63..fd7066aac 100644 --- a/packages/0x.js/test/artifacts_test.ts +++ b/packages/0x.js/test/artifacts_test.ts @@ -1,5 +1,4 @@ import { web3Factory } from '@0xproject/dev-utils'; -import * as fs from 'fs'; import 'make-promises-safe'; import { ZeroEx } from '../src'; diff --git a/packages/0x.js/test/global_hooks.ts b/packages/0x.js/test/global_hooks.ts index 6d2c3219b..9d6903af5 100644 --- a/packages/0x.js/test/global_hooks.ts +++ b/packages/0x.js/test/global_hooks.ts @@ -1,8 +1,6 @@ import { devConstants } from '@0xproject/dev-utils'; import { runV1MigrationsAsync } from '@0xproject/migrations'; -import * as path from 'path'; -import { constants } from './utils/constants'; import { provider } from './utils/web3_wrapper'; before('migrate contracts', async function(): Promise { diff --git a/packages/0x.js/test/utils/web3_wrapper.ts b/packages/0x.js/test/utils/web3_wrapper.ts index 71a0dc1c2..f7d11f138 100644 --- a/packages/0x.js/test/utils/web3_wrapper.ts +++ b/packages/0x.js/test/utils/web3_wrapper.ts @@ -1,4 +1,4 @@ -import { devConstants, web3Factory } from '@0xproject/dev-utils'; +import { web3Factory } from '@0xproject/dev-utils'; import { Provider } from '@0xproject/types'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; -- cgit v1.2.3 From 129876d1be728e967e8b10a0eabbc3f2d08374f6 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 6 Jun 2018 12:22:15 +0200 Subject: remove unused imports from 0x.js test --- packages/0x.js/test/0x.js_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/0x.js/test') diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts index 5d2eb6d7e..6f1a24375 100644 --- a/packages/0x.js/test/0x.js_test.ts +++ b/packages/0x.js/test/0x.js_test.ts @@ -6,7 +6,7 @@ import * as _ from 'lodash'; import 'make-promises-safe'; import 'mocha'; -import { ApprovalContractEventArgs, LogWithDecodedArgs, TokenEvents, ZeroEx } from '../src'; +import { TokenEvents, ZeroEx } from '../src'; import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; -- cgit v1.2.3 From a97d77064aacda3de74b04894f110b05298c5ca8 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 6 Jun 2018 15:26:40 -0700 Subject: Get build and tests to pass --- packages/0x.js/test/0x.js_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/0x.js/test') diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts index 6f1a24375..8f6134a68 100644 --- a/packages/0x.js/test/0x.js_test.ts +++ b/packages/0x.js/test/0x.js_test.ts @@ -6,7 +6,7 @@ import * as _ from 'lodash'; import 'make-promises-safe'; import 'mocha'; -import { TokenEvents, ZeroEx } from '../src'; +import { ApprovalContractEventArgs, LogWithDecodedArgs, Order, TokenEvents, ZeroEx } from '../src'; import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; -- cgit v1.2.3 From e75721016e35a07b52d2f164d860c3e18b1d4261 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 6 Jun 2018 16:43:05 -0700 Subject: Fix linting issues --- packages/0x.js/test/0x.js_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/0x.js/test') diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts index 8f6134a68..5d2eb6d7e 100644 --- a/packages/0x.js/test/0x.js_test.ts +++ b/packages/0x.js/test/0x.js_test.ts @@ -6,7 +6,7 @@ import * as _ from 'lodash'; import 'make-promises-safe'; import 'mocha'; -import { ApprovalContractEventArgs, LogWithDecodedArgs, Order, TokenEvents, ZeroEx } from '../src'; +import { ApprovalContractEventArgs, LogWithDecodedArgs, TokenEvents, ZeroEx } from '../src'; import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; -- cgit v1.2.3