Commit 117d576
committed
test(sync): strip CI env from --force e2e helpers
GitHub Actions and GitLab CI set CI=true, which the sync --force guard
in register-sync-root.ts checks before the TTY branch. Two tests were
inheriting CI=true via {...process.env, ...} and hitting the CI-guard
exit (6) instead of the branch they were written to cover:
- cli-sync.e2e.test.ts "should retranslate with --force"
runSyncAll('--force') -> execSync threw Command failed.
Fix in the shared buildEnv() so every CI-neutral invocation in
this file is unaffected by the runner's CI flag.
- cli-sync-force-guard.e2e.test.ts "proceeds without prompting
when stdin is not a TTY"
Explicitly asserts status !== 6 for the piped-stdin / no-yes
branch; CI-guard fired first. Strip CI only in that one case;
the sibling "CI=true --force without --yes" test still sets
CI=true explicitly.1 parent be5473d commit 117d576
2 files changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
172 | 175 | | |
173 | 176 | | |
174 | | - | |
| 177 | + | |
175 | 178 | | |
176 | 179 | | |
177 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | | - | |
| 104 | + | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| |||
0 commit comments