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: log ignored selectors correctly on error #1141

Closed robin-drexler closed 2 years ago

robin-drexler commented 2 years ago

What:

default getElementError implementation always logged that script and style are being ignored even when the default has been overridden with the defaultIgnore option.

It now logs the correct selector. Since the selector could be any css selector, we can't just print <script /> etc. Instead we just print the selector as is.

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

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

Codecov Report

Merging #1141 (a203ff0) into main (b7aaf18) will not change coverage. The diff coverage is n/a.

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

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

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

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

eps1lon commented 2 years ago

@all-contributors add @robin-drexler for code

allcontributors[bot] commented 2 years ago

@eps1lon

@robin-drexler already contributed before to code

github-actions[bot] commented 2 years ago

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

The release is available on:

Your semantic-release bot :package::rocket: