angular / angular/angular-cli

Allow passing --changed cli option to vitest

Aberta
#32,343 1 comentário 9 reações 0 responsáveis Ver no GitHub
angular/build:unit-test area: @angular/build feature feature: votes required
Linguagem predominante
TypeScript
Estrelas
27k
Forks
11.8k
Merge médio
14h 23min
PRs com merge (30d)
162

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece pelas opções do builder de testes unitários e acompanhe como elas são passadas ao runner do Vitest. Verifique se uma opção string alterada encaminha --changed e se os testes relevantes do builder cobrem o comando resultante.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
typescript
Domínio
cli, testing
Tipo de issue
Funcionalidade
Dificuldade
2/5
Tempo estimado
1-3 horas
Status de atividade
Estagnada
Clareza
Claramente especificada
Facilidade para iniciantes
55/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.