Skip to content

Compare the corpus's Vitest projects with Vitest's static parser - #29

Merged
Huldoser merged 1 commit into
mainfrom
compare-vitest-list
Oct 14, 2026
Merged

Huldoser merged 1 commit into
mainfrom
compare-vitest-list

Conversation

@Huldoser

Copy link
Copy Markdown
Owner

What changed

The "Scan public projects" job now also lists the 10 Vitest projects with Vitest's own static parser and compares the list with the scan. Nothing is installed: scripts/list-vitest-tests.ts calls parseSpecifications() through Vitest's API, since vitest list writes nothing when one file fails and leaves out skipped tests. The scan for the comparison applies the rules of the same Vitest version, the one this repository installs.

scripts/compare-vitest-list.ts matches tests by file and line and gives each difference one of 16 known causes. Most are the parser's own: it applies .only across files, keeps escapes in names, drops a test chained after a call, and lists helpers whose names start with test. A difference with no known cause fails the job, which still doesn't block a merge.

On the current corpus all 6,331 differences have a known cause. Before #28, it reported exactly the 9 tests that #28 fixed, and nothing else. The job takes about a minute longer.

Checklist

  • Tests cover the change, and npm run coverage reports 100%.
  • The docs describe the change: the guide or reference pages, the README, or the TSDoc of exported functions.
  • No docs change is needed.
  • A changeset describes the change for users (npm run changeset), or the change does not affect them.

The change is in CI scripts, which coverage doesn't measure; npm run corpus ran end to end with it.

The public-projects job also lists the Vitest projects with Vitest's own
static parser, through its API, with nothing installed, and compares the list
with a scan under the rules of the same Vitest version. Each difference gets
a known cause, most of them the parser's own; one without fails the job.
@Huldoser
Huldoser enabled auto-merge (squash) October 14, 2026 14:12
@Huldoser
Huldoser merged commit 97f1d8a into main Oct 14, 2026
27 checks passed
@Huldoser
Huldoser deleted the compare-vitest-list branch October 14, 2026 14:13
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.

1 participant