From 0aceaf19ef5e4392c0c63f939ca0e944a63ec4b0 Mon Sep 17 00:00:00 2001 From: Jithin Emmanuel Date: Thu, 19 Sep 2019 16:29:27 -0700 Subject: [PATCH] fix: use new circuit fuses with enhanced logging (#31) --- index.js | 2 +- package.json | 2 +- test/index.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 81970f6..873493c 100644 --- a/index.js +++ b/index.js @@ -5,7 +5,7 @@ const path = require('path'); const jenkins = require('jenkins'); const xmlescape = require('xml-escape'); const tinytim = require('tinytim'); -const Breaker = require('circuit-fuses'); +const Breaker = require('circuit-fuses').breaker; const hoek = require('hoek'); const password = Symbol('password'); diff --git a/package.json b/package.json index c054f5b..05c7efc 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "sinon": "^7.1.0" }, "dependencies": { - "circuit-fuses": "^2.2.1", + "circuit-fuses": "^4.0.4", "hoek": "^5.0.4", "jenkins": "^0.20.0", "request": "^2.88.0", diff --git a/test/index.test.js b/test/index.test.js index d4dee67..4b68515 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -151,7 +151,7 @@ describe('index', () => { BreakerFactory = sinon.stub().returns(breakerMock); - mockery.registerMock('circuit-fuses', BreakerFactory); + mockery.registerMock('circuit-fuses', { breaker: BreakerFactory }); // eslint-disable-next-line global-require Executor = require('../index');