Skip to content

Commit d758f74

Browse files
committed
Fix more tests
1 parent 13cda73 commit d758f74

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/unit-test/metric-middleware-test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,10 +678,11 @@ describe('metrics-middleware', () => {
678678
expect(Prometheus.register.getSingleMetric('http_request_size_bytes').labelNames).to.have.members(['method']);
679679
});
680680
it('and it\'s other type', () => {
681-
middleware({
682-
excludeDefaultMetricLabels: 'invalid'
683-
});
684-
expect(Prometheus.register.getSingleMetric('http_request_size_bytes').labelNames).to.have.members(['method', 'route', 'code']);
681+
expect(() => {
682+
middleware({
683+
excludeDefaultMetricLabels: 'invalid',
684+
});
685+
}).to.throw('excludeDefaultMetricLabels should be an array or a boolean');
685686
});
686687
afterEach(() => {
687688
Prometheus.register.clear();

0 commit comments

Comments
 (0)