fix(ci): force CI=false in vitest env so interactive render tests pass

Fifth CI run failed on ~15 resize/throttle/flush tests that pass locally. Root
cause: the GitHub runner sets CI=true, and vue-tui computes
`interactive = !isInCi && isTTY`. With CI=true, interactive is false, so the
resize listener, cursor control, and ANSI erases are never wired up — exactly
the behavior those tests assert. Locally CI is unset, so they passed (the
local-vs-CI trap, reproducible with `CI=true vp test run`).

Set env CI:"false" in both vitest configs. The PTY child helpers already force
CI=false per-spawn for this reason; the in-process suite (and the testing
harness's render()) needs the same. Verified: `CI=true vp run ci` on a fresh
checkout (no dist) now exits 0 with all 756 + 110 tests passing.
This commit is contained in:
Yunfei He
2026-05-29 14:54:16 +08:00
parent a4116ba08f
commit 1e9d6d0b82
2 changed files with 10 additions and 3 deletions
+4 -1
View File
@@ -20,6 +20,9 @@ export default defineConfig({
// trap). File-level parallelism is the proven, stable win.
fileParallelism: true,
testTimeout: 15000,
env: { FORCE_COLOR: "3" },
// CI:"false" so the runner's CI=true doesn't flip interactive detection off
// for any in-process render tests under this config (the PTY child helpers
// set it per-spawn, but vitest-level tests need it too).
env: { FORCE_COLOR: "3", CI: "false" },
},
});