Skip to content

[Feature]: Add --changed / --onlyChanged support #1211

@yslpn

Description

@yslpn

What problem does this feature solve?

Large monorepos need a fast local command that runs only tests affected by Git changes. Jest and Vitest already support this workflow, but Rstest currently requires running the full suite or maintaining custom scripts.

What does the proposed API look like?

Add a CLI option similar to Jest/Vitest:

jest --onlyChanged
vitest run --changed
rstest --changed
rstest --changed HEAD~1
rstest --changed origin/main

Example package script:

{
  "scripts": {
    "test:changed": "rstest --config ./rstest.config.mts --changed"
  }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for Enhancement.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions