user.test.ts 351 B

12345678910
  1. import assert from 'assert';
  2. import { app } from 'egg-mock/bootstrap';
  3. describe('test/app/module/bar/controller/user.test.ts', () => {
  4. it('should GET /', async () => {
  5. const res = await app.httpRequest().get('/bar/user').query({ userId: '20170901' });
  6. assert.equal(res.status, 200);
  7. assert.equal(res.text, 'hello, 20170901');
  8. });
  9. });