aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-08-04 12:02:01 +0800
committerGitHub <noreply@github.com>2017-08-04 12:02:01 +0800
commit5a9257208c858d11b94659518ef2375384aeac46 (patch)
tree6341d6693513ae731aa7092e4816d891e36cbc45 /test
parent17c9fd450f4c05ae39457abc8459d0353c07973b (diff)
parentc4cb371ce8ddad10d575b4ddb6cb85fe4689ca59 (diff)
downloadtangerine-wallet-browser-5a9257208c858d11b94659518ef2375384aeac46.tar
tangerine-wallet-browser-5a9257208c858d11b94659518ef2375384aeac46.tar.gz
tangerine-wallet-browser-5a9257208c858d11b94659518ef2375384aeac46.tar.bz2
tangerine-wallet-browser-5a9257208c858d11b94659518ef2375384aeac46.tar.lz
tangerine-wallet-browser-5a9257208c858d11b94659518ef2375384aeac46.tar.xz
tangerine-wallet-browser-5a9257208c858d11b94659518ef2375384aeac46.tar.zst
tangerine-wallet-browser-5a9257208c858d11b94659518ef2375384aeac46.zip
Merge branch 'master' into NewUI
Diffstat (limited to 'test')
-rw-r--r--test/unit/actions/tx_test.js10
-rw-r--r--test/unit/nodeify-test.js11
2 files changed, 17 insertions, 4 deletions
diff --git a/test/unit/actions/tx_test.js b/test/unit/actions/tx_test.js
index 0ea1bfdc7..67c72e9a5 100644
--- a/test/unit/actions/tx_test.js
+++ b/test/unit/actions/tx_test.js
@@ -45,13 +45,15 @@ describe('tx confirmation screen', function () {
before(function (done) {
actions._setBackgroundConnection({
approveTransaction (txId, cb) { cb('An error!') },
- cancelTransaction (txId) { /* noop */ },
+ cancelTransaction (txId, cb) { cb() },
clearSeedWordCache (cb) { cb() },
})
- const action = actions.cancelTx({value: firstTxId})
- result = reducers(initialState, action)
- done()
+ actions.cancelTx({value: firstTxId})((action) => {
+ result = reducers(initialState, action)
+ done()
+ })
+
})
it('should transition to the account detail view', function () {
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()
+ }
+ })
})