angular / angular/angular-cli

Allow passing --changed cli option to vitest

Abierto
#32,343 1 comentario 9 reacciones 0 asignados Ver en GitHub
angular/build:unit-test area: @angular/build feature feature: votes required
Lenguaje dominante
TypeScript
Estrellas
27k
Forks
11.8k
Merge medio
14 h 23 min
PR fusionados (30 d)
162

Descripción

### 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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza por las opciones del builder de pruebas unitarias y sigue cómo se pasan al runner de Vitest. Verifica que una opción de tipo string modificada reenvíe --changed y que las pruebas relevantes del builder cubran el comando resultante.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
cli, testing
Tipo de issue
Nueva funcionalidad
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
55/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.