Added backend tests and npm test to Dockerfile
This commit is contained in:
18
test/routes/healthcheck.ts
Normal file
18
test/routes/healthcheck.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user