diff --git a/test/unit-test/metric-middleware-test.js b/test/unit-test/metric-middleware-test.js index acd9551..9103a2f 100644 --- a/test/unit-test/metric-middleware-test.js +++ b/test/unit-test/metric-middleware-test.js @@ -678,10 +678,11 @@ describe('metrics-middleware', () => { expect(Prometheus.register.getSingleMetric('http_request_size_bytes').labelNames).to.have.members(['method']); }); it('and it\'s other type', () => { - middleware({ - excludeDefaultMetricLabels: 'invalid' - }); - expect(Prometheus.register.getSingleMetric('http_request_size_bytes').labelNames).to.have.members(['method', 'route', 'code']); + expect(() => { + middleware({ + excludeDefaultMetricLabels: 'invalid', + }); + }).to.throw('excludeDefaultMetricLabels should be an array or a boolean'); }); afterEach(() => { Prometheus.register.clear();