Allow for declaring the nycrcPath to use custom-named configuration files.
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- cypress, typescript
- Lĩnh vực
- testing
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi cách cấu hình Cypress đọc các thiết lập NYC và cách plugin hiện tìm các tệp .nycrc mặc định. Kiểm tra các bài kiểm thử cấu hình và coverage hiện có, sau đó xác minh khả năng hỗ trợ một đường dẫn tùy chỉnh được cung cấp qua config.nycrcPath hoặc config.env.nycrcPath. Hoàn tất khi Cypress sử dụng cấu hình đã chọn mà vẫn giữ nguyên hành vi mặc định hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
Right now, this plugin supports loading default named ".nycrcfiles, but cannot utilize a custom named one, like.nycrc.config.cypress.js`. An option to provide custom configuration options exist for other test frameworks, like vitest.
Specifically in the case I am using, I need to have distinct outputs between unit and component test coverage, where Vitest handles unit tests, and Cypress handles component tests. This is due to limitations of how Cypress handles source maps versus Vitest where line lengths do not align properly (and this is well-documented in this repo and in the official nyc repo as well). To avoid that issue, I need separate .nycrc configs for both test frameworks.
Cypress currently only supports default named .nycrc files, or a configuration defined in the package.json, but this limits how we can use nyc as it prefers the configuration used for Cypress over any other configurations that can exist. This is a problem if we need to merge results and report on total coverage combined by both, running nyc report will ignore the files matched in the unit test configuration.
Describe the solution you'd like
The plugin should allow for calling a custom nycrcPath when being declared in the Cypress configuration, either by config.nycrcPath or config.env.nycrcPath.
For an example, see here:
https://github.com/iFaxity/vite-plugin-istanbul?tab=readme-ov-file#istanbulplugin--opts--
Describe alternatives you've considered
I will need to use three .nycrc configurations which is incredibly messy:
.nycrc.config.mjs, a default config used only for accurate reporting of merged component + unit test code coverage results. This would be called in a command likenpx nyc report --nycrc-path=./.nycrc.config.mjs. Specifying the path is necessary here..nycrc.config.component.mjs, a Cypress-specific configuration extended from the default; it must be loaded as part of thepackage.jsonusing"nyc": { "extends": "./.nycrc.config.component.mjs" }. Runningnpx nyc reportwithout declaring the path will utilize this config instead of the default, which is the main issue..nycrc.config.unit.mjsfor Vitest files only.
Additional context
Add any other context or screenshots about the feature request here.
- Ngôn ngữ chính
- TypeScript
- Star
- 440
- Fork
- 114
- Merge trung bình
- 42 phút
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cypress-io/code-coverage
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 40/100
cypress-io/code-coverage#1018 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
cypress-io/code-coverage#993 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
cypress-io/code-coverage#959 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
performance
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
cypress-io/code-coverage#933 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
cypress-io/code-coverage#928 · 1 bình luận · 4 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cypress-io/code-coverage
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
appandflow/stim#5258 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/docs framework/hugo help wanted language/markdown
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
lingdojo/kana-dojo#33660 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
drizzle-team/drizzle-orm#6639 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100