aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/test
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-18 21:27:38 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-07-18 21:27:38 +0800
commitdad557164ea4ccc012243d43df013078a7c37eb6 (patch)
tree88e8477941dc0c98273fcb054086b2e89d034e19 /packages/contract-wrappers/test
parentacff177c547dee049b97e4b051fe22e1efaf992c (diff)
parentf3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0 (diff)
downloaddexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar
dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar.gz
dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar.bz2
dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar.lz
dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar.xz
dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.tar.zst
dexon-sol-tools-dad557164ea4ccc012243d43df013078a7c37eb6.zip
Merge branch 'v2-prototype' into feature/order-watcher-v2
Diffstat (limited to 'packages/contract-wrappers/test')
-rw-r--r--packages/contract-wrappers/test/global_hooks.ts2
-rw-r--r--packages/contract-wrappers/test/subscription_test.ts38
2 files changed, 1 insertions, 39 deletions
diff --git a/packages/contract-wrappers/test/global_hooks.ts b/packages/contract-wrappers/test/global_hooks.ts
index bf80e0908..05b23d5b8 100644
--- a/packages/contract-wrappers/test/global_hooks.ts
+++ b/packages/contract-wrappers/test/global_hooks.ts
@@ -7,7 +7,7 @@ before('migrate contracts', async function(): Promise<void> {
// HACK: Since the migrations take longer then our global mocha timeout limit
// we manually increase it for this before hook.
const mochaTestTimeoutMs = 50000;
- this.timeout(mochaTestTimeoutMs);
+ this.timeout(mochaTestTimeoutMs); // tslint:disable-line:no-invalid-this
const txDefaults = {
gas: devConstants.GAS_LIMIT,
from: devConstants.TESTRPC_FIRST_ADDRESS,
diff --git a/packages/contract-wrappers/test/subscription_test.ts b/packages/contract-wrappers/test/subscription_test.ts
index adda4ab78..80d17576f 100644
--- a/packages/contract-wrappers/test/subscription_test.ts
+++ b/packages/contract-wrappers/test/subscription_test.ts
@@ -49,44 +49,6 @@ describe('SubscriptionTest', () => {
_.each(stubs, s => s.restore());
stubs = [];
});
- it('Should receive the Error when an error occurs while fetching the block', (done: DoneCallback) => {
- (async () => {
- const errMsg = 'Error fetching block';
- const callback = callbackErrorReporter.assertNodeCallbackError(done, errMsg);
- stubs = [Sinon.stub((contractWrappers as any)._web3Wrapper, 'getBlockAsync').throws(new Error(errMsg))];
- contractWrappers.erc20Token.subscribe(
- tokenAddress,
- ERC20TokenEvents.Approval,
- indexFilterValues,
- callback,
- );
- await contractWrappers.erc20Token.setAllowanceAsync(
- tokenAddress,
- coinbase,
- addressWithoutFunds,
- allowanceAmount,
- );
- })().catch(done);
- });
- it('Should receive the Error when an error occurs while reconciling the new block', (done: DoneCallback) => {
- (async () => {
- const errMsg = 'Error fetching logs';
- const callback = callbackErrorReporter.assertNodeCallbackError(done, errMsg);
- stubs = [Sinon.stub((contractWrappers as any)._web3Wrapper, 'getLogsAsync').throws(new Error(errMsg))];
- contractWrappers.erc20Token.subscribe(
- tokenAddress,
- ERC20TokenEvents.Approval,
- indexFilterValues,
- callback,
- );
- await contractWrappers.erc20Token.setAllowanceAsync(
- tokenAddress,
- coinbase,
- addressWithoutFunds,
- allowanceAmount,
- );
- })().catch(done);
- });
it('Should allow unsubscribeAll to be called successfully after an error', (done: DoneCallback) => {
(async () => {
const callback = (err: Error | null, _logEvent?: DecodedLogEvent<ERC20TokenApprovalEventArgs>) =>