Skip to content

fix(ci): route scope-isolation issue85 test to e2e suite - #99

Merged
jeff-r2026 merged 1 commit into
Tencent:mainfrom
hsuchifeng:fix/issue85-e2e-glob
Jul 1, 2026
Merged

fix(ci): route scope-isolation issue85 test to e2e suite#99
jeff-r2026 merged 1 commit into
Tencent:mainfrom
hsuchifeng:fix/issue85-e2e-glob

Conversation

@hsuchifeng

Copy link
Copy Markdown
Contributor

Summary

  • main CI 一直在 Unit tests with coverage 这步失败,报错 CLI binary not found at .../dist/index.js
  • 根因:fix(scope): close remaining #85 scope-isolation gaps #97 新增的 src/__tests__/scope-isolation-e2e-issue85.test.ts 是个 e2e 测试(会 spawn 真实 CLI 二进制),但文件名结尾是 -e2e-issue85.test.ts,不匹配 e2e 配置的 *-e2e.test.ts glob,于是被单元测试阶段捡走执行。而单元测试跑在 build 之前,dist/index.js 尚不存在,测试直接中止。
  • 本 PR 把该文件移动到 src/__tests__/e2e/(该目录被 vitest.e2e.config.ts include、被 vitest.config.ts exclude),并修正因目录加深导致的 ROOT 相对路径(.. 增加一层)。

Test plan

  • npx vitest list --config vitest.config.ts 不再包含该测试(已从单元集中移除)
  • npx vitest list --config vitest.e2e.config.ts 正确收录该测试(7 个用例)
  • npm run build 后运行该 e2e 测试:7 passed

Made with Cursor

The test file was named `scope-isolation-e2e-issue85.test.ts`, which does
not match the e2e config's `*-e2e.test.ts` glob, so it was picked up by the
unit test step (`vitest run --coverage`). That step runs before `build`, so
`dist/index.js` is absent and the test aborts with "CLI binary not found",
failing CI on main.

Move it into `src/__tests__/e2e/` (which the e2e config includes and the
unit config excludes) and fix the ROOT path for the deeper directory.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jeff-r2026
jeff-r2026 merged commit 3c27f95 into Tencent:main Jul 1, 2026
7 checks passed
@hsuchifeng hsuchifeng mentioned this pull request Jul 3, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants