diff --git a/test/address.js b/test/address.js index 9dc50bc..3b33f7d 100644 --- a/test/address.js +++ b/test/address.js @@ -31,13 +31,9 @@ describe('Address', function() { }) it('throws error for invalid or unrecognized input', function() { - var addr = - assert.throws( - function() { - new Address('beepboopbeepboopbeepboopbeepboopbeepboopbeep') - }, - Error - ) + assert.throws(function() { + new Address('beepboopbeepboopbeepboopbeepboopbeepboopbeep') + }, Error) }) it('works for byte input', function() { @@ -51,6 +47,12 @@ describe('Address', function() { assert.equal(addr.hash, hash) assert.equal(network.testnet.addressVersion, hash.version) }) + + it('fails for bad input', function() { + assert.throws(function() { + new Address('foo') + }, Error) + }) }) describe('getVersion', function() {