Allow passing --changed cli option to vitest

Abierto
#32,343 1 comentario 9 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

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

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.

Descripción

angular/build:unit-test area: @angular/build feature feature: votes required
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: <string> option to the unit-test builder options which passes --changed <string> 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.

Lenguaje dominante
TypeScript
Estrellas
27k
Forks
11.8k
Merge medio
16 h 21 min
PR fusionados (30 d)
170

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de angular/angular-cli

Todos los issues de angular/angular-cli

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.