framework.test.js 434 B

1234567891011121314151617181920212223242526
  1. 'use strict';
  2. const mock = require('egg-mock');
  3. describe('test/framework.test.js', () => {
  4. let app;
  5. before(() => {
  6. app = mock.app({
  7. baseDir: 'example',
  8. framework: true,
  9. });
  10. return app.ready();
  11. });
  12. after(() => app.close());
  13. afterEach(mock.restore);
  14. it('should GET /', () => {
  15. return app.httpRequest()
  16. .get('/')
  17. .expect('framework-example_123456')
  18. .expect(200);
  19. });
  20. });