Skip to content

Commit 79f5d20

Browse files
committed
fix(core): drop explicit changed:false before building runCli options
`isRelatedRun` treats any defined `changed` as changed-mode, so an embedder forwarding parsed argv with boolean defaults (`changed: false`) would wrongly run only git-changed tests / reject positional filters. Mirror `toCommonOptions` and drop the explicit `false` so `runCli({ changed: false })` runs the full suite.
1 parent e29fcdf commit 79f5d20

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

packages/core/src/api/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,14 @@ export async function runCli(
587587
const { _: positionals, ...commonOptions } = argv;
588588
const filters = positionals ?? [];
589589

590+
// `isRelatedRun` treats any defined `changed` as changed-mode. An embedder
591+
// forwarding parsed argv with boolean defaults (`changed: false`) would then
592+
// wrongly run only git-changed tests / reject positional filters, so drop the
593+
// explicit `false` here the same way `toCommonOptions` does for `run()`.
594+
if (commonOptions.changed === false) {
595+
commonOptions.changed = undefined;
596+
}
597+
590598
return executeHostSafeRun(async () => {
591599
// Match the CLI's environment setup so workers (spawned per run) observe
592600
// `NODE_ENV=test` / `RSTEST=true`. Run it *inside* the guarded section so the

0 commit comments

Comments
 (0)