From 245c01bc0fed585c4ac8ed05edf7ebe1a65de80b Mon Sep 17 00:00:00 2001 From: frankiebee Date: Wed, 4 Apr 2018 14:56:30 -0700 Subject: transactions - make #_validateTxParams not async and "linting" wink wink nudge nudge --- test/unit/tx-controller-test.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'test/unit') diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js index 81d32ae29..3fec9758f 100644 --- a/test/unit/tx-controller-test.js +++ b/test/unit/tx-controller-test.js @@ -210,28 +210,25 @@ describe('Transaction Controller', function () { }) }) - describe('#validateTxParams', function () { - it('does not throw for positive values', function (done) { + describe('#_validateTxParams', function () { + it('does not throw for positive values', function () { var sample = { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', value: '0x01', } - txController._validateTxParams(sample).then(() => { - done() - }).catch(done) + txController._validateTxParams(sample) }) - it('returns error for negative values', function (done) { + it('returns error for negative values', function () { var sample = { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', value: '-0x01', } - txController._validateTxParams(sample) - .then(() => done('expected to thrown on negativity values but didn\'t')) - .catch((err) => { + try { + txController._validateTxParams(sample) + } catch (err) { assert.ok(err, 'error') - done() - }) + } }) }) -- cgit v1.2.3