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

test(Button & Switch): add some test coverage throw error #5298

Merged
merged 4 commits into from
Jun 13, 2022

Conversation

damonyoungcc
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Jun 8, 2022

Codecov Report

Merging #5298 (4075091) into master (3cecd63) will increase coverage by 0.47%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5298      +/-   ##
==========================================
+ Coverage   79.01%   79.48%   +0.47%     
==========================================
  Files         287      287              
  Lines        5984     6000      +16     
  Branches     1440     1440              
==========================================
+ Hits         4728     4769      +41     
+ Misses       1165     1144      -21     
+ Partials       91       87       -4     
Impacted Files Coverage Δ
src/components/infinite-scroll/infinite-scroll.tsx 87.14% <0.00%> (-11.08%) ⬇️
src/components/image-uploader/image-uploader.tsx 86.53% <0.00%> (-6.74%) ⬇️
src/components/image/image.tsx 71.42% <0.00%> (-0.92%) ⬇️
src/locales/zh-CN.ts 100.00% <0.00%> (ø)
src/components/button/button.tsx 100.00% <0.00%> (+6.25%) ⬆️
src/components/switch/switch.tsx 100.00% <0.00%> (+6.25%) ⬆️
src/components/text-area/text-area.tsx 100.00% <0.00%> (+58.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3cecd63...4075091. Read the comment docs.

@damonyoungcc damonyoungcc changed the title Remove throw feat(Button & Switch): add some test catch throw error Jun 8, 2022
@damonyoungcc damonyoungcc changed the title feat(Button & Switch): add some test catch throw error feat(Button & Switch): add some test coverage throw error Jun 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2022

PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-5298.surge.sh

@damonyoungcc
Copy link
Collaborator Author

#5283
是这个PR的后续,我尝试在node里劫持了unhandledRejection,不阻塞进程,就可以覆盖并通过测试
主要是受这个issue的启发jestjs/jest#10784

@damonyoungcc damonyoungcc changed the title feat(Button & Switch): add some test coverage throw error test(Button & Switch): add some test coverage throw error Jun 10, 2022
Copy link
Member

@awmleer awmleer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@awmleer awmleer merged commit fbf842c into ant-design:master Jun 13, 2022
awmleer added a commit that referenced this pull request Jun 13, 2022
…ror (#5298)"

This reverts commit fbf842c, reversing
changes made to 87533ec.
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

Successfully merging this pull request may close these issues.

2 participants