diff options
-rw-r--r-- | test/stub/provider.js | 4 |
1 files 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 +} |