fix tests for bn
This commit is contained in:
parent
9e30a0236c
commit
f178445b07
@ -1,7 +1,8 @@
|
|||||||
var chai = chai || require('chai');
|
'use strict';
|
||||||
var should = chai.should();
|
|
||||||
var assert = chai.assert;
|
var should = require('chai').should();
|
||||||
var BN = require('../lib/bn');
|
var bitcore = require('../..');
|
||||||
|
var BN = bitcore.BN;
|
||||||
|
|
||||||
describe('BN', function() {
|
describe('BN', function() {
|
||||||
it('should create a bn', function() {
|
it('should create a bn', function() {
|
||||||
@ -18,7 +19,7 @@ describe('BN', function() {
|
|||||||
it('should parse numbers below and at bn.js internal word size', function() {
|
it('should parse numbers below and at bn.js internal word size', function() {
|
||||||
var bn = new BN(Math.pow(2, 26) - 1);
|
var bn = new BN(Math.pow(2, 26) - 1);
|
||||||
bn.toString().should.equal((Math.pow(2, 26) - 1).toString());
|
bn.toString().should.equal((Math.pow(2, 26) - 1).toString());
|
||||||
var bn = new BN(Math.pow(2, 26));
|
bn = new BN(Math.pow(2, 26));
|
||||||
bn.toString().should.equal((Math.pow(2, 26)).toString());
|
bn.toString().should.equal((Math.pow(2, 26)).toString());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user