@ -11,7 +11,11 @@ function Address(obj) {
};
Address.isValid = function(addrstr) {
var address = new Address().fromString(addrstr);
try {
} catch (e) {
return false;
}
return address.isValid();
@ -18,6 +18,10 @@ describe('Address', function() {
Address.isValid(str).should.equal(true);
});
it('should invalidate this valid address string', function() {
Address.isValid(str.substr(1)).should.equal(false);
describe('#fromPubkey', function() {