Allow passing --changed cli option to vitest
- Vorherrschende Sprache
- TypeScript
- Sterne
- 27k
- Forks
- 11.8k
- Ø Merge
- 14 Std. 23 Min.
- Gemergte PRs (30 T.)
- 162
Beschreibung
### Command
test
### Description
The `unit-test` builder does not provide a way to use the `--changed` vitest option: https://vitest.dev/guide/cli.html#changed. This will analyze the import graph and only run tests affected by a change, which is useful for running a subset of the test suite for pull requests. This option is not available through the vitest configuration file.
### Describe the solution you'd like
Add a `changed: ` option to the `unit-test` builder options which passes `--changed ` to the vitest runner.
### Describe alternatives you've considered
I don't think there are any good workarounds. Using `@analogjs/vitest-angular` exposes vitest directly, but requires more setup and is not an "official" package.
Beitragsleitfaden
Rechercherichtung
Beginne bei den Optionen des Unit-Test-Builders und verfolge, wie sie an den Vitest-Runner weitergegeben werden. Überprüfe, dass eine geänderte String-Option --changed weiterleitet und dass die relevanten Builder-Tests den daraus resultierenden Befehl abdecken.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- cli, testing
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 55/100