testing-library / dom-testing-library

πŸ™ Simple and complete DOM testing utilities that encourage good testing practices.
https://testing-library.com/dom
MIT License
3.26k stars 467 forks source link

fix: Don't assume named exports interop #1154

Closed eps1lon closed 2 years ago

eps1lon commented 2 years ago

What:

Closes #995

Why:

The ecosystem is annoying

How:

Follow advise of error message:

SyntaxError: Named export 'compressToEncodedURIComponent' not found. The requested module 'lz-string' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'lz-string';
const { compressToEncodedURIComponent } = pkg;

Checklist:

codesandbox-ci[bot] commented 2 years ago

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 c3c10fee3b7fa571d2b93ca8e5839c98acd3c22e:

Sandbox Source
react-testing-library-examples Configuration
codecov[bot] commented 2 years ago

Codecov Report

Merging #1154 (c3c10fe) into main (73a5694) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main     #1154   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines          989       989           
  Branches       325       322    -3     
=========================================
  Hits           989       989           
Flag Coverage Ξ”
node-12 100.00% <100.00%> (ΓΈ)
node-14 100.00% <100.00%> (ΓΈ)
node-16 100.00% <100.00%> (ΓΈ)

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

Impacted Files Coverage Ξ”
src/screen.ts 100.00% <100.00%> (ΓΈ)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 8.16.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: