Now shares base58 data with Address base58 tests

This commit is contained in:
Daniel Cousens 2014-04-20 05:43:10 +10:00
parent 1bcc7cfd95
commit 231ccdd721
2 changed files with 3 additions and 13 deletions

View file

@ -1,5 +1,7 @@
var assert = require('assert') var assert = require('assert')
var Address = require('..').Address var Address = require('..').Address
var b58fixtures = require('./fixtures/base58')
var fixtures = require('./fixtures/address') var fixtures = require('./fixtures/address')
describe('Address', function() { describe('Address', function() {
@ -19,7 +21,7 @@ describe('Address', function() {
describe('fromBase58Check', function() { describe('fromBase58Check', function() {
it('throws on invalid base58check', function() { it('throws on invalid base58check', function() {
fixtures.malformed.forEach(function(f) { b58fixtures.invalid.forEach(function(f) {
assert.throws(function() { assert.throws(function() {
Address.fromBase58Check(f) Address.fromBase58Check(f)
}) })

View file

@ -26,17 +26,5 @@ module.exports = {
hex: 'cd7b44d0b03f2d026d1e586d7ae18903b0d385f6', hex: 'cd7b44d0b03f2d026d1e586d7ae18903b0d385f6',
base58check: '2NByiBUaEXrhmqAsg7BbLpcQSAQs1EDwt5w' base58check: '2NByiBUaEXrhmqAsg7BbLpcQSAQs1EDwt5w'
} }
],
malformed: [
'45k2PvUfZw',
'8cVHMKGRJGMEVz',
'AMPCMAGBmj9EE9oGED',
'oJPsqvHTSFFWMcmNS3aDidZexw',
'bpiuHmqwCdiHx4ASNLGvZeBw9taY',
'2ansc1MsREU2HetNdPGs2eHXTY16ircdyaH',
'iTKsHH39ooQPFxzX6RFtjPESpQ1',
'4TU74v3jnoTZGV5UuJGcr7XRg7hU',
'2a3wk37F1YmfqVtBam4gEn63oNuj',
'3rtH2aquyk4q1KGaXuiMGxaGfVPH'
] ]
} }