Socket
Socket
Sign inDemoInstall

@testing-library/dom

Package Overview
Dependencies
Maintainers
11
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@testing-library/dom - npm Package Compare versions

Comparing version 6.1.0 to 6.2.0

8

dist/@testing-library/dom.cjs.js

@@ -452,3 +452,9 @@ 'use strict';

return Array.from(container.querySelectorAll('label')).filter(function (label) {
return matcher(label.textContent, label, text, matchNormalizer);
var textToMatch = label.textContent; // The children of a textarea are part of `textContent` as well. We
// need to remove them from the string so we can match it afterwards.
label.querySelectorAll('textarea').forEach(function (textarea) {
textToMatch = textToMatch.replace(textarea.value, '');
});
return matcher(textToMatch, label, text, matchNormalizer);
});

@@ -455,0 +461,0 @@ }

@@ -446,3 +446,9 @@ import _extends from '@babel/runtime/helpers/esm/extends';

return Array.from(container.querySelectorAll('label')).filter(function (label) {
return matcher(label.textContent, label, text, matchNormalizer);
var textToMatch = label.textContent; // The children of a textarea are part of `textContent` as well. We
// need to remove them from the string so we can match it afterwards.
label.querySelectorAll('textarea').forEach(function (textarea) {
textToMatch = textToMatch.replace(textarea.value, '');
});
return matcher(textToMatch, label, text, matchNormalizer);
});

@@ -449,0 +455,0 @@ }

@@ -26,3 +26,11 @@ "use strict";

});
return Array.from(container.querySelectorAll('label')).filter(label => matcher(label.textContent, label, text, matchNormalizer));
return Array.from(container.querySelectorAll('label')).filter(label => {
let textToMatch = label.textContent; // The children of a textarea are part of `textContent` as well. We
// need to remove them from the string so we can match it afterwards.
label.querySelectorAll('textarea').forEach(textarea => {
textToMatch = textToMatch.replace(textarea.value, '');
});
return matcher(textToMatch, label, text, matchNormalizer);
});
}

@@ -29,0 +37,0 @@

2

package.json
{
"name": "@testing-library/dom",
"version": "6.1.0",
"version": "6.2.0",
"description": "Simple and complete DOM testing utilities that encourage good testing practices.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

<div align="center">
<h1>dom-testing-library</h1>
<h1>DOM Testing Library</h1>

@@ -75,3 +75,3 @@ <a href="https://www.emojione.com/emoji/1f419">

The `dom-testing-library` is a very light-weight solution for testing DOM nodes
The `DOM Testing Library` is a very light-weight solution for testing DOM nodes
(whether simulated with [`JSDOM`](https://github.com/jsdom/jsdom) as provided by

@@ -81,3 +81,3 @@ default with [Jest][] or in the browser). The main utilities it provides involve

elements on the page. In this way, the library helps ensure your tests give you
confidence in your UI code. The `dom-testing-library`'s primary guiding
confidence in your UI code. The `DOM Testing Library`'s primary guiding
principle is:

@@ -84,0 +84,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc