Conversation
The test command returned 0 when every test was skipped. Now it checks how many actually ran and fails if that is none. `passWithNoTests` alone does not cover it: that is "no test files found", not "files found and every test in them filtered out". Measured here -- with the flag set, filtering to a name that matches nothing reports 285 skipped and returns 0. Both halves are in place, and the comment says which does which. Demonstrated: a normal run reports "285 of 285 test(s) executed" and exits 0; a run filtered to nothing exits 1 saying it executed none of them. Tracked as T126. Details in the private security repository.
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.
Tracked as T126 in the private security repository (
Morelitea/security).The finding, the reasoning, the verification and the review notes live there. This description is deliberately minimal: the repository is public.
Reviewers: look up T126 in
Morelitea/security—threat-model.mdfor the finding,work-items.mdfor the acceptance criteria.Scope of this change:
package.json(test script),vitest.config.ts(one option),scripts/assert-tests-ran.mjs(new),.gitignore(one line). No application code.Verified: a normal run reports
285 of 285 test(s) executedand exits 0. A run whose selection is empty exits 1 withthe run selected 285 test(s) and executed none of them — every one was skipped, which is not a pass.Worth one line for reviewers, because the obvious remedy is not sufficient on its own: the runner's
passWithNoTestsoption covers no test files found, and not files found with every test in them filtered out. Both are in place here and the config comment says which does which.🤖 Generated with Claude Code
https://claude.ai/code/session_01D5xdKhPXJT4HMWwUyENiu1