Simplify test to represent realistic use case

feature/default_network_editable
Dan Finlay 8 years ago
parent c2b012ccc5
commit e26501aa01
  1. 16
      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)

Loading…
Cancel
Save