|
|
@ -16,6 +16,14 @@ describe('Base58Check', function() { |
|
|
|
should.exist(b58); |
|
|
|
}); |
|
|
|
|
|
|
|
describe('#set', function() { |
|
|
|
|
|
|
|
it('should set a buf', function() { |
|
|
|
should.exist(Base58Check().set({buf: buf}).buf); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
describe('@encode', function() { |
|
|
|
|
|
|
|
it('should encode the buffer accurately', function() { |
|
|
@ -83,7 +91,7 @@ describe('Base58Check', function() { |
|
|
|
describe('#toBuffer', function() { |
|
|
|
|
|
|
|
it('should return the buffer', function() { |
|
|
|
var b58 = Base58Check(buf); |
|
|
|
var b58 = Base58Check({buf: buf}); |
|
|
|
b58.buf.toString('hex').should.equal(buf.toString('hex')); |
|
|
|
}); |
|
|
|
|
|
|
@ -92,7 +100,7 @@ describe('Base58Check', function() { |
|
|
|
describe('#toString', function() { |
|
|
|
|
|
|
|
it('should return the buffer', function() { |
|
|
|
var b58 = Base58Check(buf); |
|
|
|
var b58 = Base58Check({buf: buf}); |
|
|
|
b58.toString().should.equal(enc); |
|
|
|
}); |
|
|
|
|
|
|
|