angular / angular/angular-cli

Unit test: Add reporter watermark configuration to angular.json

未關閉
#31,998 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
angular/build:unit-test area: @angular/build feature feature: insufficient votes
主要語言
TypeScript
星號
27k
分支
11.8k
平均合併
14 小時 23 分鐘
30 天內合併 PR
162

描述

### Command

test

### Description

After taking advantage of all the new Vitest unit test features in 21.0.0, there is only one configuration item left in the vitest-base.config.ts:

```
export default defineConfig({
test: {
slowTestThreshold: 1000
}
});
```

This is required since the Vitest's [slowTestThreshold](https://vitest.dev/guide/cli.html#slowtestthreshold) default of 300 ms is not adequate for extended test cases.

Ideally this configuration should be available through the angular.json configuration unit-test options, since it would allow the complete removal of the vitest-base.config.ts file.

Maybe follow the nomenclature that you introduced with "coverageWatermarks" and call it "reporterWatermark".

### Describe the solution you'd like

_No response_

### Describe alternatives you've considered

_No response_

貢獻指南

開啟貢獻指南

研究方向

先從 angular.json 中的單元測試選項和 vitest-base.config.ts 開始,然後執行儲存庫的單元測試命令,以追蹤選項如何傳遞到 Vitest。確認所需的慢速測試閾值設定可透過 angular.json 接受,並且可以移除 vitest-base.config.ts 而不會遺失設定。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
angular, typescript
領域
cli, testing, tooling
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。