fix(runner): preserve failures when tests skip
Merged
MA
2mo ago+319+319+012345678901234567890123456789-25-25-01234567890123456789
expect.soft(1).toBe(2); test.skip('feature disabled')drops the assertion failure and exits 0. A failed attempt followed by a skip on retry also disappears from the CLI summary. Related to #688.- Keep soft failures in the skipped attempt's
secondaryErrorsand show the original failure underSkipped After Failure, including retries and serial members. Exclude engine cleanup diagnostics that arrived after the skip. - Add
failOnSkippedFailure: trueto make these runs exit 1. The default staysfalseto preserve the documented skip behavior under the stability policy. Tests retain their skipped status and reason; clean skips and successful retries are unaffected.
export default {
targets,
failOnSkippedFailure: true,
};
Verified
Ran it locally: yes
- Ran the real CLI with a lifecycle-only engine in a standalone project, first with published
e2e@0.15.1, then with this branch's packed npm package:E2E_TELEMETRY_DISABLED=1 node node_modules/e2e/dist/cli/bin.js run. No browser, app server, or model credentials. - The regression cases also failed against main at
28b09f3before the fix.
| Scenario | main | this branch |
|---|---|---|
| Soft failure, then skip | Failure absent; exit 0 | Failure retained and printed; exit 0 by default, 1 with the option |
| Failed attempt, then skipped retry | Original error hidden in the CLI | Original error printed; exit 1 with the option |
| Clean skip with an engine cleanup error | Skipped; exit 0 | Skipped; exit 0, including with the option |
The packed fix prints:
Skipped After Failure 1
SKIP |headless| tests/skip.e2e.ts > soft failure followed by skip
ASSERTION_FAILED: 1 soft assertion failed
1. known regression: expected 1 to be 2
Warnings 1 skipped after failure
With the option enabled, report.json records run status failed, exit code 1, test status skipped, and reason feature disabled.
The app-backed testbed and benchmark suites were not run; verification stayed headless and service-free.