Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yorch committed Mar 9, 2021
1 parent 13cda73 commit d758f74
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/unit-test/metric-middleware-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d758f74

Please sign in to comment.