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 摘要。