Files
exp-min/tests/routers/firstRouter.test.ts
2025-06-21 23:09:28 -05:00

16 lines
504 B
TypeScript

import request from 'supertest';
import server from '../../src/server';
it('should respond to /firstroute', async () => {
const res = await request(server).get('/firstroute');
expect(res.statusCode).toEqual(200);
});
it('should respond to /firstroute/somepath/:para/', async () => {
const res = await request(server).get('/firstroute/somepath/myparam');
expect(res.statusCode).toEqual(200);
expect(res.text).toEqual(
'Hello from First Router somePath route with param: myparam',
);
});