Tencent / Tencent/tdesign-react
📌 测试覆盖提升
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 965
- Forks
- 373
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 17
Description
目前在推进 React 组件库的正式版发布,组件 Api 也进入相对稳定阶段,为保证组件质量及减轻后续维护成本需完善测试覆盖率,尽可能的让每个 Api 都有单元测试保障。
Tips
- 如果你更熟悉 Jest 可以参照 官方迁移指南 来学习如何使用 Vitest。
- 使用 vscode 的话,可以安装 Vitest 插件
- 遵循 TDesign 单元测试规范 进行单测开发
- 参与贡献请在此
issue中评论领取的组件,建议也在 vue next 仓库对应 issue 中评论,防止其他同学重复投入 - 提交 PR 前请先本地确认该组件行、函数覆盖率达80%+
认领方式:直接评论 “我来负责xxx组件” 即可。
⚠️ 重要:尽量开发一些有难度的、带边界校验的组件测试用例,以复杂组件为主。因为后面 Vue2/Vue3/React 会持续会统一自动生成测试用例。(统一通过 tdesign-api 输出测试用例,如果对这个有兴趣的可以联系 @chaishi )
具体进展
基础
-
button- @chaishi #1845 -
Link- @sommouns https://github.com/Tencent/tdesign-react/pull/1339 @chaishi #1845
布局
-
grid- @duanbaosheng #1910 -
layout- @duanbaosheng #1910 -
divider- @chaishi #1845 -
space- @StephenArk30 #1337
导航
-
affix -
anchor- @duanbaosheng #1911 -
breadcrumb -
dropdown@Isabella327 #1352 -
pagination -
menu- @carolin913 #1927 -
steps- @insekkei #1317 -
tabs
输入
-
auto-complete- @chaishi #1845 ; @chaishi @caoML #1889 -
cascader- @MrWeilian #1897 -
checkbox -
color-picker- @MrWeilian #1913 -
date-picker- @honkinglin #1896 #1935 -
form- @honkinglin #1949 @FireBushtree #1947 -
input@chaishi @caoML #1889 -
input-adornment -
input-number -
radio- @Skyenought #1334 @chaishi #1865 -
select- @uyarn #1402 -
select-input -
slider- @PBK-B #1297 -
switch- @luo3house #1948 @haishancai #214 -
tag-input@chaishi #1892 -
textarea- @PBK-B #353 -
transfer- @Isabella327 #1377 -
time-picker- @uyarn @carolin913 #1912 -
tree-select@chaishi #1899 -
upload@chaishi #1918
数据展示
-
avatar#1887 -
badge -
calendar- @CodingOnStar #1401 -
card -
collapse -
comment- @HelKyle #1360 -
list -
image- @chaishi #1890 -
loading- @uyarn #1402 -
progress -
skeleton@chaishi #1891 -
swiper- @PBK-B #1397 -
table -
tag@chaishi #1892 -
tooltip -
tree@genyuMPj #1952 -
rate -
watermark -
timeline@chaishi https://github.com/Tencent/tdesign-react/pull/1905
消息提醒
-
alert -
dialog- @dontllllllllb #1472 -
drawer -
guide@chaishi #1915 -
message -
notification -
popconfirm -
popup
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Choose an unchecked component from the issue, such as affix, breadcrumb, pagination, or tabs, and review its existing tests and the linked TDesign unit-testing guide. Add unit tests using the repository's Vitest setup, covering API behavior and boundary cases, and confirm the component's line and function coverage reaches 80% or higher.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100