You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rtk jest drops a run argument anywhere in the line, so -t run loses its value #4431
rtk jest drops every argument that is exactly run, wherever it sits, so -t run loses its value and jest filters on the next argument instead.
The rewrite rule treats jest run … as a prefix (src/discover/rules.rs), so a leading run is already gone before rtk jest sees the arguments. A run later in the line survives the rewrite, and then the skip list in src/cmds/js/vitest_cmd.rs, which compares each argument on its own, removes it. jest 30, real project, LC_ALL=C:
$ rtk rewrite "jest -t run src/ok.test.js"
rtk jest -t run src/ok.test.js
$ npx jest -t run src/ok.test.js
Tests: 2 skipped, 2 total
Ran all test suites matching src/ok.test.js with tests matching "run".
exit 0
$ rtk jest -t run src/ok.test.js # spawns: jest --no-watch --json -t src/ok.test.js
PASS (0) FAIL (0) skipped (6)
exit 0
-t now takes src/ok.test.js as the name pattern and the path filter is gone, so every suite runs. Open PR #3777 replaces the loop with strip_jest_conflicting_args, which keeps the same arg == "run" clause.
A fix drops run only as the first argument, matching the rewrite rule, and is pinned by a test on the argv for -t run.
rtk jest strips any argument equal to run anywhere in argv (not just a leading one), so -t run loses its value and the test-name filter breaks; fix should match the leading-only rewrite rule in rules.rs.
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
📁 Relevant files
src/cmds/js/vitest_cmd.rs
src/discover/rules.rs
Suggested Actions
Restrict the arg == "run" strip in src/cmds/js/vitest_cmd.rs to only the first argument
Activity
rtk-wshm-sync-bot commentedon Oct 3, 2026
🔍 Automated Triage
bugmediumSummary
rtk jeststrips any argument equal torunanywhere in argv (not just a leading one), so-t runloses its value and the test-name filter breaks; fix should match the leading-only rewrite rule in rules.rs.📁 Relevant files
src/cmds/js/vitest_cmd.rssrc/discover/rules.rsSuggested Actions
arg == "run"strip in src/cmds/js/vitest_cmd.rs to only the first argumentstrip_jest_conflicting_args— it reintroduces the samerun-anywhere bug-t run src/ok.test.jsTriaged automatically by wshm · This is an automated analysis, not a human review.