From 297e3a4b0345ec39e924dfbcf48162a808e6a8cd Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 11 Oct 2016 13:33:13 +0200 Subject: [PATCH] fix failing tests --- js/src/api/subscriptions/eth.js | 2 +- js/src/api/subscriptions/eth.spec.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/js/src/api/subscriptions/eth.js b/js/src/api/subscriptions/eth.js index bf029722d26..2c0afd0d3a3 100644 --- a/js/src/api/subscriptions/eth.js +++ b/js/src/api/subscriptions/eth.js @@ -40,7 +40,7 @@ export default class Eth { setTimeout(() => this._blockNumber(), timeout); }; - if (!this._api.transport.isConnected()) { + if (!this._api.transport.isConnected) { nextTimeout(500); return; } diff --git a/js/src/api/subscriptions/eth.spec.js b/js/src/api/subscriptions/eth.spec.js index ddbd9eb50d6..24398483e46 100644 --- a/js/src/api/subscriptions/eth.spec.js +++ b/js/src/api/subscriptions/eth.spec.js @@ -29,6 +29,9 @@ function stubApi (blockNumber) { return { _calls, + transport: { + isConnected: true + }, eth: { blockNumber: () => { const stub = sinon.stub().resolves(new BigNumber(blockNumber || START_BLOCK))();