aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/nodeify-test.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-08-04 12:01:13 +0800
committerGitHub <noreply@github.com>2017-08-04 12:01:13 +0800
commitc4cb371ce8ddad10d575b4ddb6cb85fe4689ca59 (patch)
tree7dfa4391e05630d04b1903b69f9ca2fff43715c7 /test/unit/nodeify-test.js
parentfea03ad82ef7bdf2b903922ec8b4a50453974b71 (diff)
parentd526f68c8e7d613ad79ec9383d6709651e5af77e (diff)
downloadtangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar.gz
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar.bz2
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar.lz
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar.xz
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.tar.zst
tangerine-wallet-browser-c4cb371ce8ddad10d575b4ddb6cb85fe4689ca59.zip
Merge pull request #1857 from MetaMask/hotFixCancleTx
fix cancelTransaction not receiving a callback
Diffstat (limited to 'test/unit/nodeify-test.js')
-rw-r--r--test/unit/nodeify-test.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/nodeify-test.js b/test/unit/nodeify-test.js
index 06241334d..537dae605 100644
--- a/test/unit/nodeify-test.js
+++ b/test/unit/nodeify-test.js
@@ -17,4 +17,15 @@ describe('nodeify', function () {
done()
})
})
+
+ it('should throw if the last argument is not a function', function (done) {
+ const nodified = nodeify(obj.promiseFunc, obj)
+ try {
+ nodified('baz')
+ done(new Error('should have thrown if the last argument is not a function'))
+ } catch (err) {
+ assert.equal(err.message, 'callback is not a function')
+ done()
+ }
+ })
})