Given this express route:
app.get('/wildcard/*', (req, res, next) => {
res.json({ status: 'ok' });
})
Here is a test that fails:
describe('when using wildcard with repeating string', function() {
before(() => {
return supertest(app)
.get('/wildcard/wildcard')
.expect(200)
.then((res) => {});
});
it('with no repeating strings', () => {
return supertest(app)
.get('/metrics')
.expect(200)
.then((res) => {
expect(res.text).to.contain('method="GET",route="/wildcard/*",code="200"');
});
});
});
Here are some inputs for the get() value and current prometheus route. /wildcard/* is expected for all inputs.
| Get Input |
Prom Route |
/wildcard/something |
/wildcard/* |
/wildcard/wild |
/:0card/* |
/wildcard/wildcard |
/:0/* |
Given this express route:
Here is a test that fails:
Here are some inputs for the get() value and current prometheus route.
/wildcard/*is expected for all inputs./wildcard/something/wildcard/*/wildcard/wild/:0card/*/wildcard/wildcard/:0/*