'use strict'; const { app, assert } = require('egg-mock/bootstrap'); describe('test/app/controller/home.test.js', () => { it('GET /api/info 返回服务信息', async () => { const res = await app.httpRequest().get('/api/info').expect(200); assert(res.body.ok === true); assert(typeof res.body.env === 'string'); }); });