123456789101112131415161718192021 |
- import { createApp, close, createHttpRequest } from '@midwayjs/mock';
- import { Framework } from '@midwayjs/koa';
- describe('test/controller/home.test.ts', () => {
- it('should GET /', async () => {
-
- const app = await createApp<Framework>();
-
- const result = await createHttpRequest(app).get('/');
-
- expect(result.status).toBe(200);
- expect(result.text).toBe('Hello Midwayjs!');
-
- await close(app);
- });
- });
|