Repository navigation
Compare the corpus's Vitest projects with Vitest's static parser - #29
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tscallsparseSpecifications()through Vitest's API, sincevitest listwrites 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.tsmatches tests by file and line and gives each difference one of 16 known causes. Most are the parser's own: it applies.onlyacross files, keeps escapes in names, drops a test chained after a call, and lists helpers whose names start withtest. 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
npm run coveragereports 100%.npm run changeset), or the change does not affect them.The change is in CI scripts, which coverage doesn't measure;
npm run corpusran end to end with it.