diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-07-03 08:21:27 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-07-03 08:21:27 +0800 |
commit | c734e486a027b52e9b8b8684e0b81d592698d7ac (patch) | |
tree | c6a8a5c8f29fe8c95d056e56bb6a0673f9976340 /test/unit/app/nodeify-test.js | |
parent | b4107a505b06ef4fbf41edb811134bfea38f5e8b (diff) | |
download | tangerine-wallet-browser-c734e486a027b52e9b8b8684e0b81d592698d7ac.tar tangerine-wallet-browser-c734e486a027b52e9b8b8684e0b81d592698d7ac.tar.gz tangerine-wallet-browser-c734e486a027b52e9b8b8684e0b81d592698d7ac.tar.bz2 tangerine-wallet-browser-c734e486a027b52e9b8b8684e0b81d592698d7ac.tar.lz tangerine-wallet-browser-c734e486a027b52e9b8b8684e0b81d592698d7ac.tar.xz tangerine-wallet-browser-c734e486a027b52e9b8b8684e0b81d592698d7ac.tar.zst tangerine-wallet-browser-c734e486a027b52e9b8b8684e0b81d592698d7ac.zip |
fix tests
Diffstat (limited to 'test/unit/app/nodeify-test.js')
-rw-r--r-- | test/unit/app/nodeify-test.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/unit/app/nodeify-test.js b/test/unit/app/nodeify-test.js index e21654a7b..938b76c68 100644 --- a/test/unit/app/nodeify-test.js +++ b/test/unit/app/nodeify-test.js @@ -13,9 +13,12 @@ describe('nodeify', function () { it('should retain original context', function (done) { var nodified = nodeify(obj.promiseFunc, obj) nodified('baz', function (err, res) { - assert(err, null) - assert.equal(res, 'barbaz') - done() + if (!err) { + assert.equal(res, 'barbaz') + done() + } else { + done(new Error(err.toString())) + } }) }) |