aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFrankie <frankie.diamond@gmail.com>2017-10-07 05:08:58 +0800
committerGitHub <noreply@github.com>2017-10-07 05:08:58 +0800
commit4a4338c1f4669f621fc39d34b06a77f247c7ce65 (patch)
tree71cd7b38a3040ea6a05a2b632648f5931dcb8dc4 /test
parentfa11bbf99673bb6b2dd4ad5f291d63ff1358fda6 (diff)
parent0b6dab384fe1153f16575e662fd61dbade3b9d64 (diff)
downloadtangerine-wallet-browser-4a4338c1f4669f621fc39d34b06a77f247c7ce65.tar
tangerine-wallet-browser-4a4338c1f4669f621fc39d34b06a77f247c7ce65.tar.gz
tangerine-wallet-browser-4a4338c1f4669f621fc39d34b06a77f247c7ce65.tar.bz2
tangerine-wallet-browser-4a4338c1f4669f621fc39d34b06a77f247c7ce65.tar.lz
tangerine-wallet-browser-4a4338c1f4669f621fc39d34b06a77f247c7ce65.tar.xz
tangerine-wallet-browser-4a4338c1f4669f621fc39d34b06a77f247c7ce65.tar.zst
tangerine-wallet-browser-4a4338c1f4669f621fc39d34b06a77f247c7ce65.zip
Merge pull request #2305 from MetaMask/nodeify
nodeify - allow callback to be optional
Diffstat (limited to 'test')
-rw-r--r--test/unit/nodeify-test.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/unit/nodeify-test.js b/test/unit/nodeify-test.js
index 537dae605..c7b127889 100644
--- a/test/unit/nodeify-test.js
+++ b/test/unit/nodeify-test.js
@@ -18,14 +18,13 @@ describe('nodeify', function () {
})
})
- it('should throw if the last argument is not a function', function (done) {
+ it('should allow the last argument to not be 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()
+ } catch (err) {
+ done(new Error('should not have thrown if the last argument is not a function'))
}
})
})