Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

想参考下组件单测覆盖率情况,但是发现单测未通过,且覆盖率数据没有如预期出现 #322

Open
jzhmcoo1 opened this issue Jan 3, 2024 · 1 comment

Comments

@jzhmcoo1
Copy link

jzhmcoo1 commented Jan 3, 2024

A description of the problem, steps to reproduce, or with code samples, can be hosted on a GitHub repository with a link to the repository. (问题说明,重现步骤,或附上代码示例,可存放 GitHub 仓库并提供仓库链接。)

环境

node 16.15.1
yarn 1.22.19

问题说明

想拉下来跑下单测,参考下组件的单测覆盖率情况,结果发现单测没有完全通过,并且覆盖率的数据并未如期出现

重现步骤

仓库拉下来后,main分支,安装依赖,根目录运行 yarn run init,进package/quarkd, yarn build。

参考了测试框架@open-wc/testing-karma的文档,在测试命令后加入--coverage

"test": "karma start --coverage --timeout 10000"

具体效果如下图所示:

CleanShot 2024-01-03 at 20 29 53@2x
@jzhmcoo1 jzhmcoo1 changed the title 想参考下组件单测覆盖率情况,但是发现单测有报错,且覆盖率数据没有如预期出现 想参考下组件单测覆盖率情况,但是发现单测未通过,且覆盖率数据没有如预期出现 Jan 3, 2024
@sanqi-med
Copy link
Contributor

我们修复下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants