Files
node-template-express/test/routes/healthcheck.ts
2020-11-20 08:42:41 +01:00

19 lines
424 B
TypeScript

import healthRouter from '../../src/routes/healthcheck';
import * as request from 'supertest';
import * as express from 'express';
describe('backend:routes/healthcheck', () => {
it('should return 200', (done) => {
const app = express();
app.use(healthRouter);
request(app)
.get("/")
.set('Accept', 'application/json')
.expect(200)
.end((err, res) => {
if (err) throw err;
done();
});
});
});