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

chore(expect): expose default matchers #11932

Merged
merged 3 commits into from Oct 5, 2021

Conversation

@mxschmitt
Copy link
Contributor

@mxschmitt mxschmitt commented Oct 5, 2021

Summary

Projects which use expect sometimes want to have access to the default matchers before they get overridden. This was not possible before and lead to ERR_PACKAGE_PATH_NOT_EXPORTED. After this change it's possible to require it via expect/build/matchers.

Context:

@codecov-commenter
Copy link

@codecov-commenter codecov-commenter commented Oct 5, 2021

Codecov Report

Merging #11932 (cd8ffe4) into main (508827c) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #11932      +/-   ##
==========================================
- Coverage   68.75%   68.74%   -0.01%     
==========================================
  Files         322      322              
  Lines       16587    16587              
  Branches     4787     4787              
==========================================
- Hits        11404    11403       -1     
- Misses       5151     5152       +1     
  Partials       32       32              
Impacted Files Coverage Δ
packages/expect/src/utils.ts 95.85% <0.00%> (-0.52%) ⬇️

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 508827c...cd8ffe4. Read the comment docs.

Loading

packages/expect/package.json Show resolved Hide resolved
Loading
@mxschmitt mxschmitt requested a review from SimenB Oct 5, 2021
@SimenB
Copy link
Collaborator

@SimenB SimenB commented Oct 5, 2021

We can do this for now, but I'll probably remove it from Jest 28 (in favour of a more explicit import (somehow)).

Is this one change enough for you in playwright?

Loading

@SimenB
Copy link
Collaborator

@SimenB SimenB commented Oct 5, 2021

Also, can you rebase? Just to trigger GH actions which was down when you opened this (https://www.githubstatus.com/incidents/bdbzpz7qxmbx)

Loading

@mxschmitt mxschmitt force-pushed the chore/expose-matchers branch from c358324 to c25e267 Oct 5, 2021
@mxschmitt
Copy link
Contributor Author

@mxschmitt mxschmitt commented Oct 5, 2021

Is this one change enough for you in playwright?

Yes looks good from our side. We then only mirror printReceivedStringContainExpectedSubstring + ​printReceivedStringContainExpectedResult which seems maintainable. Once Jest 28 switched to ESM and the exports are easier, we can figure out something for them if needed.

Thanks Simen. 👍

Loading

just to maybe trigger ci
SimenB
SimenB approved these changes Oct 5, 2021
@SimenB
Copy link
Collaborator

@SimenB SimenB commented Oct 5, 2021

Lint is still unhappy. I'm on mobile, otherwise I'd fix it 🙂

Loading

@mxschmitt mxschmitt force-pushed the chore/expose-matchers branch from f410d39 to cd8ffe4 Oct 5, 2021
@mxschmitt
Copy link
Contributor Author

@mxschmitt mxschmitt commented Oct 5, 2021

Its fixed now, thanks!

Loading

@SimenB SimenB merged commit 24f9bc8 into facebook:main Oct 5, 2021
30 checks passed
Loading
@SimenB
Copy link
Collaborator

@SimenB SimenB commented Oct 8, 2021

Loading

@mxschmitt
Copy link
Contributor Author

@mxschmitt mxschmitt commented Oct 8, 2021

Thanks Simen, works! do you think its also possible to merge #11498?

Loading

@github-actions
Copy link

@github-actions github-actions bot commented Nov 8, 2021

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

Loading

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants