'use strict'; const { app, assert } = require('egg-mock/bootstrap'); describe('test/app/swagger-doc.test.js', () => { it('should GET /swagger-doc', async () => { const res = await app.httpRequest() .get('/swagger-doc') .expect(200); assert(res.body.info.title === 'OMS API'); assert(res.body.paths['/']); }); it('should GET /swagger-ui.html', async () => { await app.httpRequest() .get('/swagger-ui.html') .expect(200); }); });