diff --git a/test/pushgatewayTest.js b/test/pushgatewayTest.js index 2171d861..f7a510e9 100644 --- a/test/pushgatewayTest.js +++ b/test/pushgatewayTest.js @@ -102,12 +102,16 @@ describe.each([ .post('/metrics', body) .reply(200); - instance.requireJobName = false; + instance = new Pushgateway( + 'http://192.168.99.100:9091', + { + timeout: 10, + requireJobName: false, + }, + registry, + ); - return instance.pushAdd().then(() => { - instance.requireJobName = true; - return expect(mockHttp.isDone()); - }); + return instance.pushAdd().then(() => expect(mockHttp.isDone())); }); });