DeepVCode
DeepVCode copied to clipboard
test: 为缺失的 integration-tests 增加优雅占位 runner (#34)
关联 issue
Closes #34
问题
package.json 中的 test:e2e / test:integration:sandbox:* 调用 integration-tests/run-tests.js,但该目录在开源时被剥离,脚本与 eslint.config.js 中针对 ./integration-tests/**/*.js 的配置块却保留了下来。结果:
npm run test:e2e/test:integration:*直接以Cannot find module .../integration-tests/run-tests.js报错;eslint integration-tests因路径不存在报错;- 误导贡献者以为当前 checkout 有 E2E 覆盖。
改动(采用 issue 建议方案 3:占位脚本)
新增 integration-tests/run-tests.js:
- 打印清晰说明:E2E/集成测试套件未随开源版本提供;
- 回显请求的
GEMINI_SANDBOX模式,并提示单测仍可用; process.exit(0)—— 作为「优雅跳过」而非硬失败(test:ci本就不调用这些脚本);- 同时让
eslint integration-tests有文件可 lint。
未补回真实用例(其内容不在开源仓库中);如后续补回完整套件,可直接替换本占位文件。
测试
npm run test:e2e→ 退出码 0,输出清晰跳过说明(--verbose --keep-output额外参数被安全忽略)。npm run test:integration:sandbox:none→ 退出码 0。npx eslint integration-tests→ 通过(0 error)。npx prettier --check integration-tests/run-tests.js→ 通过。- 文件含仓库强制的 license 头。