angular / angular/angular-cli

Allow passing --changed cli option to vitest

オープン
#32,343 コメント 1 件 リアクション 9 件 担当者 0 名 GitHub で見る
angular/build:unit-test area: @angular/build feature feature: votes required
主要言語
TypeScript
スター
27k
フォーク
11.8k
平均マージ
14時間 23分
マージ済み PR(30日)
162

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

ユニットテストビルダーのオプションから始め、それらが Vitest runner にどのように渡されるかを追跡します。変更された string オプションが --changed を渡すこと、また関連するビルダーテストで結果として生成されるコマンドをカバーしていることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
cli, testing
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。