Skip to content

Conversation

@arpitBhalla
Copy link
Member

@arpitBhalla arpitBhalla commented Jul 18, 2021

What kind of change does this PR introduce?
Migrate existing tests from enzyme to react native testing library

  • Avatar
  • Accessory
  • Button
  • Badge
  • withBadge

Did you add tests for your changes?
yes i have added few more test case as well.

If relevant, did you update the documentation?
Not required

Summary
Existing code uses enzyme for testing this PR would change it to react native testing library.
Related #2922

Does this PR introduce a breaking change?
No

Other information
GSoC task of @arpitBhalla

Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Jul 18, 2021

Codecov Report

Merging #3150 (856ef6f) into next (259177f) will increase coverage by 0.21%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #3150      +/-   ##
==========================================
+ Coverage   83.87%   84.09%   +0.21%     
==========================================
  Files          78       78              
  Lines        1687     1685       -2     
  Branches      666      666              
==========================================
+ Hits         1415     1417       +2     
+ Misses        268      264       -4     
  Partials        4        4              
Impacted Files Coverage Δ
src/Avatar/index.tsx 100.00% <ø> (ø)
src/Avatar/Avatar.tsx 97.05% <100.00%> (-2.95%) ⬇️
src/Badge/Badge.tsx 100.00% <100.00%> (ø)
src/Button/Button.tsx 96.36% <100.00%> (ø)
src/Badge/withBadge.tsx 88.88% <0.00%> (-11.12%) ⬇️
src/Avatar/Avatar.Accessory.tsx 100.00% <0.00%> (+70.00%) ⬆️

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 259177f...856ef6f. Read the comment docs.

arpitBhalla and others added 2 commits July 19, 2021 18:06
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
Co-authored-by: Arpit Bhalla <68342121+arpit-bhalla@users.noreply.github.com>
@arpitBhalla arpitBhalla marked this pull request as ready for review July 19, 2021 13:31
@pranshuchittora pranshuchittora mentioned this pull request Jul 25, 2021
18 tasks
Copy link
Collaborator

@flyingcircle flyingcircle left a comment

Choose a reason for hiding this comment

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

I don't think code in .ci is th right place. You want to use setupFiles in the jest config instead: https://stackoverflow.com/questions/50411719/shared-utils-functions-for-testing-with-jest/52910794

EDIT: actually thinking about it a bit more. It's really doesn't matter too much. I think this all looks fine.

@flyingcircle flyingcircle merged commit ed5cf81 into react-native-elements:next Aug 9, 2021
@arpitBhalla arpitBhalla deleted the rn-testing2 branch May 17, 2022 12:55
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