Add jasmine test

This commit is contained in:
Asbjørn Dyhrberg Thegler
2022-06-17 21:01:14 +02:00
parent a1284ec3e5
commit 1ee094eb04

View File

@@ -590,5 +590,23 @@ describe('index', () => {
});
});
});
fit('additional metricsApp can be used', done => {
const app = express();
const metricsApp = express();
const bundled = bundle({metricsApp});
app.use(bundled);
const agent = supertest(app);
const metricsAgent = supertest(metricsApp);
agent.get('/').end(() => {
metricsAgent.get('/metrics').end((err, res) => {
expect(res.status).toBe(200);
expect(res.text).toMatch(/status_code="404"/);
done();
});
});
});
});
});