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

Fix incorrect default import from @testing-library/dom #1162

Merged
merged 2 commits into from Sep 15, 2023

Conversation

bryanjtc
Copy link
Contributor

What:

Fixes: #1160

Why:
@testing-library/dom doesn’t have a default export.

When trying to import and resolve a default export from @testing-library/dom the package would fail.

How:

Removing the default export
Checklist:

  • Documentation
  • Tests
  • Ready to be merged

@bryanjtc bryanjtc changed the title Update dtl.ts Fix incorrect default import from @testing-library/dom Sep 15, 2023
@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 15, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2334675:

Sandbox Source
userEvent-dom Configuration
userEvent-react Configuration

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks!

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #1162 (2334675) into main (4be87b3) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1162      +/-   ##
==========================================
- Coverage   99.46%   99.46%   -0.01%     
==========================================
  Files          92       89       -3     
  Lines        2070     2067       -3     
  Branches      704      701       -3     
==========================================
- Hits         2059     2056       -3     
  Misses         11       11              

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

@bryanjtc
Copy link
Contributor Author

bryanjtc commented Sep 15, 2023

I will replace any other default export from @testing-library/dom. Since the change I made only fixes one.

@yannbf
Copy link
Contributor

yannbf commented Sep 15, 2023

@kentcdodds would you mind checking this whenever you have time? thanks!

@kentcdodds kentcdodds merged commit d7483f0 into testing-library:main Sep 15, 2023
5 checks passed
@kentcdodds
Copy link
Member

Thanks for the ping @yannbf!

@kentcdodds
Copy link
Member

Thanks for the contribution @bryanjtc!

@github-actions
Copy link

🎉 This PR is included in version 14.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@berekuk
Copy link

berekuk commented Sep 15, 2023

Thanks for this!
Somehow it still doesn't work for me for default imports in Typescript:

Captura de pantalla 2023-09-15 a la(s) 12 30 46

But named import now is fine (I think it wasn't before, with my Typescript setup).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants