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

🚥 小程序测试覆盖率提升 #701

Closed
50 tasks done
LeeJim opened this issue Aug 2, 2022 · 22 comments
Closed
50 tasks done

🚥 小程序测试覆盖率提升 #701

LeeJim opened this issue Aug 2, 2022 · 22 comments

Comments

@LeeJim
Copy link
Collaborator

LeeJim commented Aug 2, 2022

目前在推进小程序的测试覆盖,需要覆盖基本的场景。具体要求:

  • 行覆盖率达80%+
  • 基本展示相关的组件,只需要 snapshots 测试
  • 有交互的组件,需要覆盖所有场景,要求函数覆盖率 80+%

Tips

  • 避免踩坑,可以参考 Checkbox 的测试用例
  • 使用 vscode 的话,可以安装 Jest 插件

认领方式:直接评论 “我来负责xxx组件” 即可。

认领任务之前,强烈推荐先查看下 《如何编写单元测试(快速指南)》

激励

参与共建的开发者,将可以获得 TDesign 周边(贴纸、鼠标垫、工卡套等);

成为核心贡献者,将会拥有 TDesign 专属头像。

具体进展

基础

布局

导航

输入

数据展示

消息提醒

每周进展

7.30 - 8.5

  • 跑通单元测试
  • 流水线增加单元测试,通过才能合并
  • 增加脚本,自动生成所有 demo 的 snapshots 测试
  • 增加脚本,自动生成每个组件的测试覆盖率徽章
  • 完成 Checkbox & Button,进度 4%

8.6 - 8.12

8.13 - 8.19

  • 累计完成 20 个组件;进度 40%
  • 目前测试覆盖率 28%
  • 新增 1 个贡献者

8.20 - 8.26

  • 累计完成 25 个组件;进度 51%
  • 目前测试覆盖率 31%

8.27 - 9.2

  • 累计完成 35 个组件;进度 70%
  • 目前测试覆盖率 55%

9.3 - 9.9

  • 累计完成 44 个组件;进度 88%
  • 目前测试覆盖率 76%
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2022

👋 @LeeJim,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@LeeJim LeeJim changed the title 测试覆盖 🚥 测试覆盖 Aug 2, 2022
@LeeJim LeeJim pinned this issue Aug 2, 2022
This was referenced Aug 2, 2022
@anlyyao
Copy link
Collaborator

anlyyao commented Aug 5, 2022

认领 BackTop Loading Drawer NoticeBar Progress Tag Stepper ActionSheet

@Perisiguiendo
Copy link
Contributor

Perisiguiendo commented Aug 9, 2022

认领 Divider Search Switch Badge

@CodingOnStar
Copy link
Contributor

认领Result

@AntzyMo
Copy link
Contributor

AntzyMo commented Aug 10, 2022

认领Message Empty

@isanxia
Copy link
Contributor

isanxia commented Aug 16, 2022

认领Rate

CodingOnStar pushed a commit to CodingOnStar/tdesign-miniprogram that referenced this issue Aug 17, 2022
CodingOnStar added a commit to CodingOnStar/tdesign-miniprogram that referenced this issue Aug 17, 2022
@isanxia isanxia mentioned this issue Aug 18, 2022
11 tasks
@isanxia
Copy link
Contributor

isanxia commented Aug 18, 2022

认领Steps

Perisiguiendo added a commit to Perisiguiendo/tdesign-miniprogram that referenced this issue Aug 18, 2022
PengYYYYY pushed a commit that referenced this issue Aug 18, 2022
* fix(badge): add show-zero param & fix offset without unit

* test(badge): add unit test

#701
PengYYYYY pushed a commit that referenced this issue Aug 18, 2022
@xiaosansiji xiaosansiji changed the title 🚥 测试覆盖 🚥 小程序测试覆盖率提升 Aug 19, 2022
@zhangpaopao0609
Copy link
Contributor

认领 Footer

@isanxia isanxia mentioned this issue Aug 23, 2022
15 tasks
@AntzyMo
Copy link
Contributor

AntzyMo commented Aug 24, 2022

微信图片_20220824115047
npx jest empty报这个错导致运行不下去

@anlyyao
Copy link
Collaborator

anlyyao commented Aug 24, 2022

@AntzyMo 重装下依赖试试、

@AntzyMo
Copy link
Contributor

AntzyMo commented Aug 24, 2022

@AntzyMo重装下依赖尝试、
试过了 node的版本也换过

@LeeJim
Copy link
Collaborator Author

LeeJim commented Aug 25, 2022

微信图片_20220824115047 npx jest empty报这个错导致运行不下去

只有这个组件还是所有?

@AntzyMo
Copy link
Contributor

AntzyMo commented Aug 25, 2022

微信图片_20220824115047 npx jest empty报这个错导致运行不下去

只有这个组件还是所有?

所有 运行写好的也报这个问题了 只有demo.test.js才有这个问题

@Perisiguiendo
Copy link
Contributor

认领Skeleton、Avatar、Sticky

@webwyb
Copy link
Contributor

webwyb commented Sep 2, 2022

认领SwipeCell

@anlyyao
Copy link
Collaborator

anlyyao commented Sep 5, 2022

认领Upload

@LeeJim
Copy link
Collaborator Author

LeeJim commented Sep 6, 2022

认领Message Empty

Empty 我来跟进好了

@AntzyMo
Copy link
Contributor

AntzyMo commented Sep 6, 2022

认领Message Empty

Empty 我来跟进好了

Empty我记得已经合并了的

@LeeJim
Copy link
Collaborator Author

LeeJim commented Sep 6, 2022

认领Message Empty

Empty 我来跟进好了

Empty我记得已经合并了的

哦哦,好的

@CodingOnStar
Copy link
Contributor

认领indexes

CodingOnStar pushed a commit to CodingOnStar/tdesign-miniprogram that referenced this issue Sep 7, 2022
CodingOnStar added a commit to CodingOnStar/tdesign-miniprogram that referenced this issue Sep 7, 2022
CodingOnStar pushed a commit to CodingOnStar/tdesign-miniprogram that referenced this issue Sep 13, 2022
CodingOnStar added a commit to CodingOnStar/tdesign-miniprogram that referenced this issue Sep 13, 2022
CodingOnStar added a commit to CodingOnStar/tdesign-miniprogram that referenced this issue Sep 13, 2022
CodingOnStar added a commit to CodingOnStar/tdesign-miniprogram that referenced this issue Sep 13, 2022
@anlyyao
Copy link
Collaborator

anlyyao commented Sep 14, 2022

认领 swiper

@LeeJim
Copy link
Collaborator Author

LeeJim commented Sep 15, 2022

感谢大家的贡献,目前 测试覆盖率工作 已圆满完成

测试覆盖率已达 93%+ 🎉🎉

@LeeJim LeeJim closed this as completed Sep 15, 2022
@LeeJim LeeJim unpinned this issue Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

8 participants