Enable string value to be passed to Base58.encode()

This commit is contained in:
2012-04-19 23:25:56 +01:00
parent b45ca698b1
commit 33ae17b282
2 changed files with 6 additions and 0 deletions

View File

@@ -10,6 +10,11 @@ describe 'Base58', ->
for str, num of examples
Base58.encode(num).should.eql(str)
describe 'when passed a string only containing numbers', ->
it 'encodes string after first converting it to an integer', ->
for str, num of examples
Base58.encode(num.toString()).should.eql(str)
describe 'when passed a float', ->
it 'throws an error', ->
(-> Base58.encode(3.14)).should