typescript-express-starter
Version:
Quick and Easy TypeScript Express Starter
19 lines (15 loc) • 491 B
text/typescript
import request from 'supertest';
import App from '@/app';
import IndexRoute from '@routes/index.route';
afterAll(async () => {
await new Promise<void>(resolve => setTimeout(() => resolve(), 500));
});
describe('Testing Index', () => {
describe('[GET] /', () => {
it('response statusCode 200', () => {
const indexRoute = new IndexRoute();
const app = new App([indexRoute]);
return request(app.getServer()).get(`${indexRoute.path}`).expect(200);
});
});
});