angular / angular/angular-cli

Unit test: Add reporter watermark configuration to angular.json

Đang mở
#31,998 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
angular/build:unit-test area: @angular/build feature feature: insufficient votes
Ngôn ngữ chính
TypeScript
Star
27k
Fork
11.8k
Merge trung bình
14 giờ 23 phút
Pull request đã merge (30 ngày)
162

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với các tùy chọn kiểm thử đơn vị trong angular.json và vitest-base.config.ts, sau đó chạy lệnh kiểm thử đơn vị của repository để theo dõi cách các tùy chọn được truyền đến Vitest. Xác nhận rằng thiết lập ngưỡng mong muốn cho các kiểm thử chậm được chấp nhận thông qua angular.json và rằng có thể xóa vitest-base.config.ts mà không làm mất cấu hình.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
cli, testing, tooling
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.