message: Convert test results to numbers instead of comparing strings
  Summary:
  When the leading digit of inputArr is 0, it is dropped from
  the string representation. This causes test failures with probability
  exactly 1/16.
  Reviewers: bigly, zacleids, danny, leo
  Subscribers: tyler
diff: +require('should');
  +
  const { randomBytes } = require('crypto');
  const { bytesToWord } = require('../../../src/v2/internal');
  @@ -43,11 +45,13 @@ describe('Internal:', () => {
  res.should.equal(Math.pow(2, 16));
  });
  - it('should convert a random number', () => {
  + it('should convert 1000 random numbers', () => {
  + for (let i = 0; i < 1000; i++) {
  const inputArr = randomBytes(4);
  -
  - const res = bytesToWord(inputArr);
  - res.toString(16).should.equal(inputArr.toString('hex'));
  + const resStr = bytesToWord(inputArr).toString(16);
  + const arrStr = inputArr.toString('hex');
  + parseInt(resStr, 16).should.equal(parseInt(arrStr, 16));
  + }
  });
  });
  });
  