Summary
When using native @swedevtools/livedoc-vitest tag filters, non-matching scenarios/rules are skipped/pending as expected, but the Vitest process exits with code 1 even when all included tests pass and the report has 0 failures.
This makes it difficult to use LiveDoc status tags as CI/menu lanes, because a lane like status/ready fails the command solely because excluded/quarantined tests remain pending in the loaded spec modules.
Version
@swedevtools/livedoc-vitest: 0.2.0
vitest: 4.0.18
- Node/npm project on Windows PowerShell
Filter setup
import { livedoc } from "@swedevtools/livedoc-vitest";
livedoc.options.filters.include = ["status/ready"];
livedoc.options.filters.exclude = ["status/quarantine", "status/active"];
In the local project this is wired from environment variables:
cd D:\dev\AstralAIProxy\tests\AstralProxy.UI
$env:LIVEDOC_INCLUDE_TAGS = 'status/ready'
$env:LIVEDOC_EXCLUDE_TAGS = 'status/quarantine,status/active'
npm test
Expected behavior
If every included scenario/rule/test passes and there are no failures or LiveDoc validation errors, the process exits 0. Filtered-out tests may still be shown as pending/skipped in the report, but they should not fail the command.
Actual behavior
Native filtering appears to select execution correctly, but the process exits 1 with 0 failures.
Observed summary from the run:
- Feature totals:
44 scenarios, 3 pass, 0 fail, 41 pending, 0 warnings
- Specification totals:
32 rules, 21 pass, 0 fail, 15 pending
- Suite totals:
0 pass, 0 fail, 16 pending
- Process exit:
1
The passing counts are the status/ready lane; the pending counts are excluded/not-ready tests loaded by Vitest.
Why this matters
We want to use LiveDoc tags as the native source of truth for validation lanes, for example:
@status/active for the screen currently being implemented
@status/ready for the always-green baseline
@status/quarantine for visible debt
A file-preselection workaround can avoid the non-zero exit by only passing matching files to Vitest, but that hides the native filtering behavior and makes the lane semantics less accurate.
Could the reporter/filter integration treat filter-pending items as non-failing for the process exit, or expose an option to do so?
Summary
When using native
@swedevtools/livedoc-vitesttag filters, non-matching scenarios/rules are skipped/pending as expected, but the Vitest process exits with code1even when all included tests pass and the report has0failures.This makes it difficult to use LiveDoc status tags as CI/menu lanes, because a lane like
status/readyfails the command solely because excluded/quarantined tests remain pending in the loaded spec modules.Version
@swedevtools/livedoc-vitest:0.2.0vitest:4.0.18Filter setup
In the local project this is wired from environment variables:
Expected behavior
If every included scenario/rule/test passes and there are no failures or LiveDoc validation errors, the process exits
0. Filtered-out tests may still be shown as pending/skipped in the report, but they should not fail the command.Actual behavior
Native filtering appears to select execution correctly, but the process exits
1with0failures.Observed summary from the run:
44scenarios,3pass,0fail,41pending,0warnings32rules,21pass,0fail,15pending0pass,0fail,16pending1The passing counts are the
status/readylane; the pending counts are excluded/not-ready tests loaded by Vitest.Why this matters
We want to use LiveDoc tags as the native source of truth for validation lanes, for example:
@status/activefor the screen currently being implemented@status/readyfor the always-green baseline@status/quarantinefor visible debtA file-preselection workaround can avoid the non-zero exit by only passing matching files to Vitest, but that hides the native filtering behavior and makes the lane semantics less accurate.
Could the reporter/filter integration treat filter-pending items as non-failing for the process exit, or expose an option to do so?