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

refactor: expose legacy extend-expect #189

Merged
merged 2 commits into from
Aug 22, 2023

Conversation

mdjastrzebski
Copy link
Collaborator

What:

This PR is exposing alternative legacy_toXxx matcher naming, in order to support ongoing migration of Jest Native matchers to RNTL, so that users can use both new RNTL matchers and legacy Jest Native matchers to gradually migrate their code.

This PR is not doing advertising this change yet, as the RNTL migration is ongoing. I would add relevant documentation when RNTL matchers are read.

Why:

This is needed as migrated matchers are usually named the same as Jest Native matchers, so without this there would be a naming clash.

How:

Add legacy-extend-expect export, so which extends expect with legacy_toXxx matchers rather than typically toXxx naming. The original extend-expect remains still available, so existing users should not be affected.

Checklist:

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

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Merging #189 (7f3c4a2) into main (d372016) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #189   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        14    +1     
  Lines          252       253    +1     
  Branches        77        77           
=========================================
+ Hits           252       253    +1     
Flag Coverage Δ
node-14 100.00% <100.00%> (ø)
node-16 100.00% <100.00%> (ø)
node-18 100.00% <100.00%> (ø)

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

Files Changed Coverage Δ
src/legacy-extend-expect.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mdjastrzebski mdjastrzebski changed the title chore: expose legacy extend-expect refactor: expose legacy extend-expect Aug 22, 2023
@mdjastrzebski mdjastrzebski merged commit 872163b into main Aug 22, 2023
6 checks passed
@github-actions
Copy link

🎉 This PR is included in version 5.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

None yet

1 participant