diff options
author | tmashuang <thomas.b.huang@gmail.com> | 2018-05-21 20:59:26 +0800 |
---|---|---|
committer | tmashuang <thomas.b.huang@gmail.com> | 2018-05-21 20:59:26 +0800 |
commit | 13ebb0b455bc775a53b6bb30e675a39d02d8f6f5 (patch) | |
tree | 8e746281051ff1f75b948d89e1053c8da2ffc2cd /test/unit/nodeify-test.js | |
parent | f279a8e61a3f50326fe9f26b0b860af47cd662fb (diff) | |
download | tangerine-wallet-browser-13ebb0b455bc775a53b6bb30e675a39d02d8f6f5.tar tangerine-wallet-browser-13ebb0b455bc775a53b6bb30e675a39d02d8f6f5.tar.gz tangerine-wallet-browser-13ebb0b455bc775a53b6bb30e675a39d02d8f6f5.tar.bz2 tangerine-wallet-browser-13ebb0b455bc775a53b6bb30e675a39d02d8f6f5.tar.lz tangerine-wallet-browser-13ebb0b455bc775a53b6bb30e675a39d02d8f6f5.tar.xz tangerine-wallet-browser-13ebb0b455bc775a53b6bb30e675a39d02d8f6f5.tar.zst tangerine-wallet-browser-13ebb0b455bc775a53b6bb30e675a39d02d8f6f5.zip |
Moved loose some loose test files to sub folders
Diffstat (limited to 'test/unit/nodeify-test.js')
-rw-r--r-- | test/unit/nodeify-test.js | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/test/unit/nodeify-test.js b/test/unit/nodeify-test.js deleted file mode 100644 index c7b127889..000000000 --- a/test/unit/nodeify-test.js +++ /dev/null @@ -1,30 +0,0 @@ -const assert = require('assert') -const nodeify = require('../../app/scripts/lib/nodeify') - -describe('nodeify', function () { - var obj = { - foo: 'bar', - promiseFunc: function (a) { - var solution = this.foo + a - return Promise.resolve(solution) - }, - } - - it('should retain original context', function (done) { - var nodified = nodeify(obj.promiseFunc, obj) - nodified('baz', function (err, res) { - assert.equal(res, 'barbaz') - done() - }) - }) - - it('should allow the last argument to not be a function', function (done) { - const nodified = nodeify(obj.promiseFunc, obj) - try { - nodified('baz') - done() - } catch (err) { - done(new Error('should not have thrown if the last argument is not a function')) - } - }) -}) |