diff options
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/components/bn-as-decimal-input-test.js | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/test/unit/components/bn-as-decimal-input-test.js b/test/unit/components/bn-as-decimal-input-test.js index 4ea910fb0..1f589c210 100644 --- a/test/unit/components/bn-as-decimal-input-test.js +++ b/test/unit/components/bn-as-decimal-input-test.js @@ -14,24 +14,20 @@ describe.only('BnInput', function () { const buffer = new Buffer(message, 'utf8') const hex = buffer.toString('hex') - it('can tolerate a large number at a high precision', function (done) { + it('can tolerate a gas decimal number at a high precision', function (done) { const renderer = ReactTestUtils.createRenderer(); - let valueStr = '1' - while (valueStr.length < 18 + 7) { + let valueStr = '20' + while (valueStr.length < 20) { valueStr += '0' } const value = new BN(valueStr, 10) - let inputStr = '11' - while (inputStr.length < 7) { - inputStr += '0' - } - inputStr += '.01' + let inputStr = '2.3' - let targetStr = inputStr.split('.').join() - while (targetStr.length < 18 + 7) { + let targetStr = '23' + while (targetStr.length < 19) { targetStr += '0' } const target = new BN(targetStr, 10) |