diff --git a/test/hdnode.js b/test/hdnode.js index 342f0f5..1cbfd7c 100644 --- a/test/hdnode.js +++ b/test/hdnode.js @@ -144,17 +144,21 @@ describe('HDNode', function () { describe('fromBase58', function () { fixtures.valid.forEach(function (f) { it('imports ' + f.master.base58 + ' (public) correctly', function () { + var network = networks[f.network] var hd = HDNode.fromBase58(f.master.base58) assert.equal(hd.toBase58(), f.master.base58) + assert.equal(hd.network, network) }) }) fixtures.valid.forEach(function (f) { it('imports ' + f.master.base58Priv + ' (private) correctly', function () { - var hd = HDNode.fromBase58(f.master.base58Priv) + var network = networks[f.network] + var hd = HDNode.fromBase58(f.master.base58Priv, network) assert.equal(hd.toBase58(), f.master.base58Priv) + assert.equal(hd.network, network) }) }) diff --git a/test/network.js b/test/network.js index aef09e0..79c9288 100644 --- a/test/network.js +++ b/test/network.js @@ -27,7 +27,7 @@ describe('networks', function () { var extb58 = f.bip32[name] it('resolves ' + extb58 + ' to ' + f.network, function () { - assert.equal(HDNode.fromBase58(extb58, network).network, network) + assert.equal(HDNode.fromBase58(extb58).network, network) }) }) })