From d393948033b564dad63eaaeac96f89aa92ecf8b2 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Tue, 18 Jun 2019 15:19:57 +0700 Subject: [PATCH] Test errors don't throw in correct conditions --- test/errors.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/errors.js b/test/errors.js index 471ceb2..e265cb0 100644 --- a/test/errors.js +++ b/test/errors.js @@ -27,10 +27,16 @@ test('Vain throws when `options.prefix` is `undefined`', t => { const options = {}; const error = t.throws(() => new Vain(options)); t.is(error.message, 'Prefix must be set'); + + options.prefix = 'BTC'; + t.notThrows(() => new Vain(options)); }); test('Vain throws when `options.xpub` is `undefined` when `options.keyFormat` is `xpub`', t => { const options = {keyFormat: 'xpub', prefix: 'BTC'}; const error = t.throws(() => new Vain(options)); t.is(error.message, 'An xpub string must be passed in'); + + options.xpub = 'xpub6EDZZg3os4RaLxfPpnGBb7ajm6ccyjRs3PGZ5jNK31rPnbpyKb7dc87cEPaLEjFYDBGCQT8VMm8q8MVj2tj7HPBu8syxu82cdHLCNaQmT42'; + t.notThrows(() => new Vain(options)); });