@dashevo/wallet-lib
Version:
Light wallet library for Dash
14 lines (12 loc) • 524 B
JavaScript
const { expect } = require('chai');
const varInt = require('./varInt');
describe('Utils - varInt', function suite() {
this.timeout(10000);
it('should get varint of size from length', () => {
expect(varInt.varIntSizeBytesFromLength()).to.equal(1);
expect(varInt.varIntSizeBytesFromLength(1)).to.equal(1);
expect(varInt.varIntSizeBytesFromLength(42)).to.equal(1);
expect(varInt.varIntSizeBytesFromLength(42000)).to.equal(3);
expect(varInt.varIntSizeBytesFromLength(4200000000)).to.equal(5);
});
});