From 2b9781ab4c1f0e4d8ae43833152e33884317b870 Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 17 Jan 2018 19:19:20 -0800 Subject: test - stub provider needs to handle errors --- test/stub/provider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/stub/provider.js b/test/stub/provider.js index 85e1da707..07d92129f 100644 --- a/test/stub/provider.js +++ b/test/stub/provider.js @@ -24,7 +24,7 @@ function createEthJsQueryStub (stubProvider) { get: (obj, method) => { return (...params) => { return new Promise((resolve, reject) => { - stubProvider.sendAsync({ method: `eth_${method}`, params }, (err, ress) => resolve(ress.result)) + stubProvider.sendAsync({ method: `eth_${method}`, params }, (err, res) => err ? reject(err) : resolve(res.result)) }) } }, @@ -35,4 +35,4 @@ function createStubedProvider (resultStub) { const engine = createEngineForTestData() engine.push(scaffoldMiddleware(resultStub)) return providerFromEngine(engine) -} \ No newline at end of file +} -- cgit v1.2.3