HDNode/tests: add testing for invalid network version from networks list

This commit is contained in:
Daniel Cousens 2016-02-25 13:41:35 +11:00
parent 9e32c892ef
commit bdb0dd4a17
3 changed files with 9 additions and 6 deletions

View file

@ -210,9 +210,9 @@ describe('HDNode', function () {
fixtures.invalid.fromBase58.forEach(function (f) {
it('throws on ' + f.string, function () {
assert.throws(function () {
var network = NETWORKS[f.network]
var networks = f.network ? NETWORKS[f.network] : NETWORKS_LIST
HDNode.fromBase58(f.string, network)
HDNode.fromBase58(f.string, networks)
}, new RegExp(f.exception))
})
})