home.test.js 482 B

1234567891011121314151617181920
  1. 'use strict';
  2. const { app, assert } = require('egg-mock/bootstrap');
  3. describe('test/app/controller/home.test.js', () => {
  4. it('should assert', () => {
  5. const pkg = require('../../../package.json');
  6. assert(app.config.keys.startsWith(pkg.name));
  7. // const ctx = app.mockContext({});
  8. // yield ctx.service.xx();
  9. });
  10. it('should GET /', () => {
  11. return app.httpRequest()
  12. .get('/')
  13. .expect('hi, egg')
  14. .expect(200);
  15. });
  16. });