# 测试执行日志 ## 一、执行信息 | 项目 | 内容 | |---|---| | 执行日期 | 2026-08-26 | | 测试命令 | `npm test` | | 前置链路 | `lint 0 error → compile 通过 → compile:test 通过` | | 测试运行器 | `@vscode/test-cli`(.vscode-test.mjs:`out/tests/**/*.test.js`) | | 插件版本 | 1.3.0 | | 测试文件数 | 16 个 `*.test.ts` | ## 二、执行结果摘要 | 指标 | 结果 | |---|---| | 通过(passing) | **116** | | 失败(failing) | 0 | | 跳过(pending) | 0 | | 运行时长 | ~5s(Extension Host 退出码 0) | > 详细逐条用例清单见 `tests/test-cases.md`。 ## 三、运行环境 | 项目 | 内容 | |---|---| | 测试宿主 | VSCode Extension Test Host(@vscode/test-electron) | | 操作系统 | Windows(win32) | | Node.js | 插件 devDependencies 锁定版本(@types/node 22.x) | | 编译 | `tsc -p ./` + `node scripts/copy-webview-js.mjs`(主工程);`tsc -p ./tsconfig.test.json`(测试工程) | | Lint | `eslint src`:0 error(仅 `src/utils/mockDocument.ts` 2 处既有 curly warning) | ## 四、复现方式 ```bash npm run lint # eslint src → 0 error npm run compile # tsc 主工程 npm run compile:test # tsc 测试工程(out/tests) npm test # @vscode/test-cli 运行 out/tests/**/*.test.js ```