Repository navigation
test(cli): the components fields test prints its text from the JSON run's response, one doctor run - #9284
Merged
Conversation
…un's response, one doctor run It ran the whole components check twice (JSON, then text), each starting TypeScript, and timed out at 30 s on main's busier legs. It now runs once with --json and prints the same response through printIntegrationCheckResponse, the printer the command uses. Same assertions. Test only.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
This looks ready to merge. The test keeps every assertion and prints its text report through the same printer the command's text path uses, so it covers the same fields with one doctor integration components run instead of two. The speed-up and the mutation check described in the PR both hold, and the command's own text branch stays covered by "components prints no [ok] for props it could not compare".
[Automated review]
This branch was successfully deployed
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.
Maintainer impact
Main's Node tests are red, on the first run and on the re-run.
doctor-integration.test.mjs› "components prints every field of the props comparison that JSON carries" timed out at Vitest's 30 s limit (35 s, then 37 s). It took 17–19 s on main even before the wider sharding (#9207). A busy test job pushes it over the limit and blocks every push's test gate on unrelated work.Intended invariant
Unchanged: the components report's text names every field its JSON carries (each finding's component, prop and kind; each unchecked component's reason; each type not compared), with the same findings and summary lines. The response-type reference names every field too.
Change
The test ran the whole
doctor integration componentscommand twice, once with--jsonand once for text. Each run starts the project's TypeScript to compare props, which is most of the cost. It now runs the command once with--jsonand prints the text from that same response withprintIntegrationCheckResponse. Without--json, the command prints exactly that response through exactly that printer (printComponentConflicts). Every assertion is unchanged. The command's text path itself stays covered end to end by the othercomponentstests in the file, such as "components says documented props match when they do". Test only: no product code and no Changeset.Evidence
reasonfrom the printer's unchecked records (doctor.mjs) fails the test ({"component":"AcmeLonely",…,"reason":…}: expected undefined to be defined).Scope
Testing
pnpm exec vitest run --project node packages/cli/clients/cli/commands/doctor-integration.test.mjs(the target, plus the mutation check above).prettierandeslinton the file are clean.The Node-leg duration rebalance is a separate pull request; this one only makes the test itself cheaper.
Posted by Cindy's agent on her behalf.