feat: 添加路由描述和更新运行代码参数,优化测试用例

This commit is contained in:
2026-01-26 04:20:56 +08:00
parent 0f8986b491
commit e7dca513f3
2 changed files with 6 additions and 3 deletions

View File

@@ -4,7 +4,8 @@ const app = new Mini();
app.route({
path: 'main',
id: 'abc'
id: 'abc',
description: '这是一个测试的 main 路由'
}).define(async (ctx) => {
ctx.body = {
a: '123'

View File

@@ -52,6 +52,8 @@ import path from 'node:path'
const res = await runCode(path.join(process.cwd(), './src/test/mini.ts'), {
// path: 'main'
// id: 'abc'
path: 'router',
key: 'list'
})
console.log('res', res)
console.log('res', res.data.data.list)