Issues when running jest with coverage for all packages within a lerna monorepo
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- testing
Hướng nghiên cứu
Bắt đầu bằng cách so sánh coverage của Jest từ thư mục package với coverage từ thư mục gốc của repository Lerna, tập trung vào node_modules/jsdom-worker/src/index.js:89 và function được import từ package khác trong monorepo. Tái hiện ReferenceError và xác định vì sao instrumentation cov_* đi tới worker; hoàn tất khi việc chạy coverage ở cấp root không còn lỗi này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I am not 100% sure if my problem really is jsdom-worker related but I guess here is my best starting point:
I am currently working on a lerna monorepo where one of the packages executes a function in a worker. I therefore included jsdom-worker in the corresponding test for this package. The function is an export from a different file of this package. I had to add /* istanbul ignore file */ to it because otherwise the coverage would fail due to cov_* variables added during testing not being reachable for the worker. Jest is used for testing and coverage.
So far this would be OK - and tests as well as coverage run just fine when run localy from within the package.
But if I do run the coverage from the root directory it always fails with ReferenceError: cov_2j8vgqrgle is not defined in node_modules/jsdom-worker/src/index.js:89:18.
The function that is run in the worker has a function imported from another package of the monorepo and if I do run global coverage (remember: running coverage from within the package is 100% fine) this one seems to be interpreted and cov_* gets added to it which is guaranteed to fail.
Any idea what goes wrong and if there is anything I can do about it?
- Ngôn ngữ chính
- JavaScript
- Star
- 291
- Fork
- 20
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 developit/jsdom-worker
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
developit/jsdom-worker#26 · 2 bình luận ·
-
Support import and require Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
developit/jsdom-worker#25 · 3 bình luận · 2 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
developit/jsdom-worker#24 · 32 bình luận · 59 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
developit/jsdom-worker#22 · 2 bình luận ·
-
node-fetch 3.x broken in jest Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
developit/jsdom-worker#20 · 2 bình luận ·
Tất cả issue của developit/jsdom-worker
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
mksglu/context-mode#1200 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
neondatabase/website#5944 ·
-
module: core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
jaegertracing/jaeger-ui#4506 ·