Coverage is not working with 'cypress' in project path
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- cypress, typescript
调研方向
在链接的 angular-library-cypress 项目中,通过从包含 cypress 的路径运行 npm run cypress-project-run 来复现该问题,然后再从重命名后的路径重复运行。先从 README 的 Debugging 部分以及创建或定位 .nyc_output/out.json 的代码开始;当 coverage 不受项目路径名称影响而正常工作时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Logs and screenshots
Please provide debug logs by running Cypress from the terminal with DEBUG=code-coverage environment variable set. See the Debugging section of the README file.
Exception in output that coverage could not be found
2023-11-12 12:03:29: webpack compiled in 8669 ms (c571cd78cb7c28bd)
NgButtonComponent
Cannot find coverage file C:\Daten\jNetwork\angular-library-cypress\.nyc_output\out.json
Skipping coverage report
√ should click (375ms)
Versions
- What is this plugin's version? If this is NOT the latest released version, can you try the latest version, please?
3.12.9
- If the plugin worked before in version X but stopped after upgrading to version Y, please try the released versions between X and Y to see where the breaking change was.
no
- What is the Cypress version?
13.5.0
- What is your operating system?
Windows 10
- What is the shell? -
windows cmd
- What is the Node version?
v16.15.1
- What is the NPM version?
8.12.2
- How do you instrument your application? Cypress does not instrument web application code, so you must do it yourself.
see in my example projcet
- When running tests, if you open the web application in a regular browser and open DevTools, do you see
window.__coverage__object? Can you paste a screenshot?
problem can be reproduced with my example project
- Is there a
.nyc_outputfolder? Is there a.nyc_output/out.jsonfile? Is it empty? Can you paste at least part of it so we can see the keys and file paths?
no. folder is not written
- Do you have any custom NYC settings in
package.json(nycobject) or in other NYC config files?
no
- Do you run Cypress tests in a Docker container?
no
Describe the bug
If the name Cypress is present in the project path, Code Coverage does not work. The output Cannot find coverage file C:\Data\jNetwork\angular-library-cypress\.nyc_output\out.json appears in the console. If you rename the path from angular-library-cypress to angular-library-cy as in the example here, everything works correctly.
You can reproduce the problem with the project https://github.com/philippjenni/angular-library-cypress. Check out the project in the angular-library-cypress folder and execute npm run cypress-project-run. Code coverage will not work. Check out the same project in a folder without the word cypress and execute npm run cypress-project-run. The coverage report is written correctly.
Link to the repo
- 主要语言
- TypeScript
- 星标
- 440
- 派生
- 114
- 平均合并
- 42 分钟
- 30 天内合并 PR
- 19
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cypress-io/code-coverage 的其他 Issue
-
难度 3/5 半天 新手友好度 40/100
cypress-io/code-coverage#1018 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
cypress-io/code-coverage#993 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
cypress-io/code-coverage#967 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
cypress-io/code-coverage#959 ·
维护者通常 1 天内回复
-
performance
难度 4/5 3-5 天 新手友好度 42/100
cypress-io/code-coverage#933 ·
维护者通常 1 天内回复
查看 cypress-io/code-coverage 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 88/100
danielw-sudo/agentuto#63 ·
维护者通常 1 天内回复
-
idea-scout idea:341
难度 2/5 1-3 小时 新手友好度 76/100
jeanibarz/agent-notebook#341 ·
维护者通常 1 天内回复
-
documentation good first issue roadmap
难度 1/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
type:bug
难度 2/5 1-3 小时 新手友好度 72/100
nightgauge/nightgauge#3077 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
LibreChat-AI/LibreChat#17915 ·
维护者通常 1 天内回复