Browse Source

Now shares base58 data with Address base58 tests

hk-custom-address
Daniel Cousens 11 years ago
parent
commit
231ccdd721
  1. 4
      test/address.js
  2. 12
      test/fixtures/address.js

4
test/address.js

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

12
test/fixtures/address.js

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

Loading…
Cancel
Save