Test runner: --test-reporter-destination should create the folder if not found
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
- 68/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- javascript, node.js
- Lĩnh vực
- cli, testing-qa
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện vấn đề với lệnh được cung cấp node --test --experimental-code-coverage --test-reporter-destination="coverage/lcov.info" khi coverage không tồn tại. Theo dõi cách test runner xử lý đích của reporter và xác minh rằng thư mục đích được tạo trước khi báo cáo coverage được ghi, kể cả khi cần các thư mục lồng nhau.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What is the problem this feature will solve?
Hi 👋
Fairly easy one:
I have node --test --experimental-code-coverage --test-reporter-destination="coverage/lcov.info" outputting the coverage file to the coverage folder.
However, if the coverage folder does not exist beforehand, an ENOENT is thrown.
Since storing the behavior of storing coverage in coverage/lcov.info, and having that folder in .gitignore is rather standard, it'd be nice to have Node creating the folder in which it will place the coverage report in case it doesn't exist.
Thanks :)
What is the feature you are proposing to solve the problem?
When writing coverage report, check if the destination folder exists, and if not, create it beforehand
What alternatives have you considered?
- version controlling the coverage folder with a
.gitkeepfile, but it's cumbersome - Having the CLI
testscript in my package json create the folder itself, but that's quite inelegant to maintain for both Windows and Unix users - Switching to another test runner and losing all the charisma points that come with using the native one
- Ngôn ngữ chính
- JavaScript
- Star
- 122k
- Fork
- 37.4k
- Merge trung bình
- 4 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 276
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 nodejs/node
-
doc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
build
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Issue tương tự
-
bug customer-eng Durable Agents Inngest status: needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
optimization optimization:agents-md-curator
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
githubnext/gh-aw-cao#13475 ·
-
[BUG]: "Clear All" in Settings doesn't clear the saved analysis, old data comes back after reload Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
AOSSIE-Org/OrgExplorer#253 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
oxc-project/oxc#26944 ·
-
ai-observability bug team/ai-observability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100