|
|
@ -5,9 +5,12 @@ var bitcore = require('../bitcore'); |
|
|
|
|
|
|
|
var should = chai.should(); |
|
|
|
|
|
|
|
var test_data = require('./testdata'); |
|
|
|
|
|
|
|
var bignum = bitcore.bignum; |
|
|
|
var base58 = bitcore.base58; |
|
|
|
var base58Check = base58.base58Check; |
|
|
|
var util = bitcore.util; |
|
|
|
|
|
|
|
describe('Miscelaneous stuff', function() { |
|
|
|
it('should initialze the config object', function() { |
|
|
@ -55,6 +58,11 @@ describe('Miscelaneous stuff', function() { |
|
|
|
var m = '1QCJj1gPZKx2EwzGo9Ri8mMBs39STvDYcv'; |
|
|
|
base58Check.encode(base58Check.decode(m)).should.equal(m); |
|
|
|
}); |
|
|
|
test_data.dataEncodeDecode.forEach(function(datum) { |
|
|
|
it('base58 encode/decode checks ' + datum, function() { |
|
|
|
base58.encode(new Buffer(datum[0], 'hex')).should.equal(datum[1]); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|