Skip to content

fix(dependencies): update outdated dependencies and tests #78

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

Merged

Conversation

Alex-Whyatt
Copy link
Contributor

What:

Updates critically outdated dependencies, including @babel/runtime, which was responsible for failing tests on the main branch. Updates tests where required, in line with newly required props or required child elements.

Why:

Tests faililng on master, jest-diff version 24.x was causing issues for us when we tried to upgrade jest.

How:

Carefully upgrading the dependencies affected to a newer version and fixing the affected test files.

Checklist:

  • [N/A] Documentation added to the
    docs
  • [N/A] Typescript definitions updated
  • Tests
  • Ready to be merged

The only possibly breaking change I occurred here is that the button <title> prop could no longer be found by the toHaveProp function. I suspect this was due to this text being moved into the components "children" by react-test-renderer.

ToBeEnabled/Disabled has removed accessibilityStates testing as they have been removed callstack/react-native-paper#1920.

Minor change in toHaveStyle because jest-diff removed their default export.

@Donald47
Copy link

@kentcdodds, @brunohkbx, @thymikee

Sorry for bothering you folks, pulled your names from #31 is there any chance we could get this PR looked at? Things in here have become pretty stale and even things like #77 are currently blocked.

@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #78 (1097aa3) into main (0dbda71) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #78   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          149       149           
  Branches        48        48           
=========================================
  Hits           149       149           
Flag Coverage Δ
node-12 100.00% <100.00%> (ø)
node-14 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/to-contain-element.js 100.00% <ø> (ø)
src/to-have-prop.js 100.00% <ø> (ø)
src/utils.js 100.00% <ø> (ø)
src/to-have-style.js 100.00% <100.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 0dbda71...1097aa3. Read the comment docs.

Copy link
Collaborator

@mdjastrzebski mdjastrzebski left a comment

Choose a reason for hiding this comment

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

Awesome work @Alex-Whyatt 🚀

It seems that codecov complains about to-contain-elements.js coverage and hence blocks the potential merging. Would you be able to look at it as well? Should be a small case of adding one or two test cases to achieve missing line 31 coverage.

@Alex-Whyatt Alex-Whyatt force-pushed the fix-deps-update-tests branch from 5aaa228 to 1097aa3 Compare May 20, 2022 10:33
@Alex-Whyatt
Copy link
Contributor Author

Alex-Whyatt commented May 20, 2022

Code coverage is happier now locally. Not sure what was causing it as it occurred in unaffected files.

Should be good to go pending approval @mdjastrzebski

@mdjastrzebski
Copy link
Collaborator

Code Coverage also happy on CI!

@Alex-Whyatt Thank you for your contribution!

@mdjastrzebski mdjastrzebski merged commit 985a98e into testing-library:main May 20, 2022
@github-actions
Copy link

🎉 This PR is included in version 4.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Alex-Whyatt Alex-Whyatt deleted the fix-deps-update-tests branch May 24, 2022 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants