`all:true` not working with Next application

Đang mở
#552 10 bình luận 4 reaction 0 người được giao Xem trên GitHub

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cypress, next.js, typescript
Lĩnh vực
frontend, testing-qa

Hướng nghiên cứu

Báo cáo chỉ ra thiết lập nyc.all trong package.json, .nyc_output/out.json và một ứng dụng Next được thực thi thông qua Cypress. Trước tiên, hãy tái hiện với all:true và so sánh độ bao phủ của các trang đã tải và chưa tải; được xem là hoàn tất khi các tệp được NYC all chọn xuất hiện trong đầu ra độ bao phủ.

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

Mô tả

Versions

  • What is this plugin's version? 3.9.12
  • What is Cypress version? 8.2.0
  • What is your operating system? Mac OS 12.1
  • What is the shell? ZSH
  • What is the Node version? 14.18.2
  • What is the NPM version? 8.3.2
  • How do you instrument your application? Cypress does not instrument web application code, so you need to do it yourself.
    Like mentioned in the installation guide here
  • When running tests, if you open the web application in regular browser, and open DevTools, do you see window.__coverage__ object? Can you paste a screenshot?

I don't think I do but I get coverage in the end.

  • Is there .nyc_output folder? Is there .nyc_output/out.json file. Is it empty? Can you paste at least part of it so we can see the keys and file paths?

This is generated, but no empty objects for empty files.

  • Do you have any custom NYC settings in package.json (nyc object) or in other NYC config files
  "nyc": {
    "all": true
  }
  • Do you run Cypress tests in a Docker container?
    No

Describe the bug
I use the option all:true but I don't see all files. For example I have some files in pages/.. which are not displayed at all. It seems that just loaded files are used.

The NYC options from the package.json are used because I fiddled around with the include parameter and it is filtering, so that seems to work. I don't see any difference in the output if I use true or false for the all option.

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cypress-io/code-coverage

Tất cả issue của cypress-io/code-coverage

Issue tương tự

Thêm issue về TypeScript

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.