mirror of https://github.com/status-im/web3.js.git
14 lines
459 B
JavaScript
14 lines
459 B
JavaScript
|
var assert = require('assert');
|
||
|
var utils = require('../lib/utils.js');
|
||
|
|
||
|
describe('utils', function () {
|
||
|
describe('toDecimal', function () {
|
||
|
it('should return the correct value', function () {
|
||
|
|
||
|
assert.equal(utils.toDecimal("0x3e8"), '1000');
|
||
|
// allow compatiblity
|
||
|
assert.equal(utils.toDecimal(100000), '100000');
|
||
|
assert.equal(utils.toDecimal('100000'), '100000');
|
||
|
});
|
||
|
});
|
||
|
});
|