aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/idStore-test.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js
index 72ecf34d5..3ca89cd38 100644
--- a/test/unit/idStore-test.js
+++ b/test/unit/idStore-test.js
@@ -151,11 +151,9 @@ describe('IdentityStore', function() {
const gas = '0x01'
const bnGas = new BN(gas, 16)
- const result = idStore.addGasBuffer(gas)
- const bnResult = new BN(result, 16)
+ const bnResult = idStore.addGasBuffer(bnGas)
assert.ok(bnResult.gt(gas), 'added more gas as buffer.')
- assert.equal(result.indexOf('0x'), 0, 'include hex prefix')
})
it('buffers 20%', function() {
@@ -172,13 +170,10 @@ describe('IdentityStore', function() {
const correctBuffer = bnGas.div(five)
const correct = bnGas.add(correctBuffer)
- const result = idStore.addGasBuffer(gas)
- const bnResult = new BN(ethUtil.stripHexPrefix(result), 16)
+ const bnResult = idStore.addGasBuffer(bnGas)
- assert.equal(result.indexOf('0x'), 0, 'included hex prefix')
assert(bnResult.gt(bnGas), 'Estimate increased in value.')
assert.equal(bnResult.sub(bnGas).toString(10), correctBuffer.toString(10), 'added 20% gas')
- assert.equal(result, '0x' + correct.toString(16), 'Added the right amount')
})
})