diff --git a/src/VaultClient.js b/src/VaultClient.js index 2a46a2d..b5b1009 100644 --- a/src/VaultClient.js +++ b/src/VaultClient.js @@ -63,11 +63,8 @@ class VaultClient { let instance = vaultInstances[name]; if (instance === undefined) { vaultInstances[name] = instance = new VaultClient(options); - - return instance; } - - throw new errors.InvalidArgumentsError('Instance with such name already booted'); + return instance; } /** diff --git a/test/unit.test.js b/test/unit.test.js index 904c1a7..f5ea20a 100644 --- a/test/unit.test.js +++ b/test/unit.test.js @@ -27,7 +27,7 @@ describe('Unit tests', function () { expect(VaultClient.get('tst')).to.equal(i); - expect(() => VaultClient.boot('tst', bootOpts)).to.throw(VaultErr.InvalidArgumentsError, 'Instance with such name already booted'); + expect(VaultClient.boot('tst')).to.equal(i); const i2 = VaultClient.boot('tst2', bootOpts);