Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@testing-library/jest-dom

Package Overview
Dependencies
Maintainers
12
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@testing-library/jest-dom - npm Package Compare versions

Comparing version 5.1.1 to 5.2.0

10

dist/to-have-value.js

@@ -25,2 +25,10 @@ "use strict";

const expectsValue = expectedValue !== undefined;
let expectedTypedValue = expectedValue;
let receivedTypedValue = receivedValue;
if (expectedValue == receivedValue && expectedValue !== receivedValue) {
expectedTypedValue = `${expectedValue} (${typeof expectedValue})`;
receivedTypedValue = `${receivedValue} (${typeof receivedValue})`;
}
return {

@@ -31,5 +39,5 @@ pass: expectsValue ? (0, _isEqualWith.default)(receivedValue, expectedValue, _utils.compareArraysAsSet) : Boolean(receivedValue),

const matcher = (0, _jestMatcherUtils.matcherHint)(`${this.isNot ? '.not' : ''}.toHaveValue`, 'element', expectedValue);
return (0, _utils.getMessage)(matcher, `Expected the element ${to} have value`, expectsValue ? expectedValue : '(any)', 'Received', receivedValue);
return (0, _utils.getMessage)(matcher, `Expected the element ${to} have value`, expectsValue ? expectedTypedValue : '(any)', 'Received', receivedTypedValue);
}
};
}

31

package.json
{
"name": "@testing-library/jest-dom",
"version": "5.1.1",
"version": "5.2.0",
"description": "Custom jest matchers to test the state of the DOM",

@@ -12,15 +12,10 @@ "main": "dist/index.js",

"scripts": {
"build": "kcd-scripts build",
"format": "kcd-scripts format",
"build": "kcd-scripts build",
"lint": "kcd-scripts lint",
"setup": "npm install && npm run validate -s",
"test": "kcd-scripts test",
"test:update": "npm test -- --updateSnapshot --coverage",
"validate": "kcd-scripts validate",
"setup": "npm install && npm run validate -s"
"validate": "kcd-scripts validate"
},
"husky": {
"hooks": {
"pre-commit": "kcd-scripts pre-commit"
}
},
"files": [

@@ -37,7 +32,7 @@ "dist",

],
"author": "Ernesto Garcia <gnapse@gmail.com> (http://gnapse.github.io/)",
"author": "Ernesto Garcia <gnapse@gmail.com> (http://gnapse.github.io)",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.8.3",
"@types/testing-library__jest-dom": "^5.0.0",
"@babel/runtime": "^7.9.2",
"@types/testing-library__jest-dom": "^5.0.2",
"chalk": "^3.0.0",

@@ -49,10 +44,10 @@ "css": "^2.2.4",

"lodash": "^4.17.15",
"pretty-format": "^25.1.0",
"redent": "^3.0.0"
},
"devDependencies": {
"jest-environment-jsdom-sixteen": "^1.0.0",
"jest-watch-select-projects": "^1.0.0",
"jsdom": "^16.0.1",
"kcd-scripts": "^4.1.0"
"jest-environment-jsdom-sixteen": "^1.0.3",
"jest-watch-select-projects": "^2.0.0",
"jsdom": "^16.2.1",
"kcd-scripts": "^5.6.0",
"pretty-format": "^25.1.0"
},

@@ -72,3 +67,3 @@ "eslintConfig": {

"type": "git",
"url": "https://github.com/testing-library/jest-dom.git"
"url": "https://github.com/testing-library/jest-dom"
},

@@ -75,0 +70,0 @@ "bugs": {

@@ -827,4 +827,4 @@ <div align="center">

Contrary to what its name implies, this matcher only checks that you passed to
it a valid DOM element. It does not have a clear definition of that "the DOM"
is. Therefore, it does not check wether that element is contained anywhere.
it a valid DOM element. It does not have a clear definition of what "the DOM"
is. Therefore, it does not check whether that element is contained anywhere.

@@ -938,2 +938,3 @@ This is the main reason why this matcher is deprecated, and will be removed in

<td align="center"><a href="https://github.com/benmonro"><img src="https://avatars3.githubusercontent.com/u/399236?v=4" width="100px;" alt=""/><br /><sub><b>Ben Monro</b></sub></a><br /><a href="https://github.com/testing-library/jest-dom/commits?author=benmonro" title="Documentation">📖</a></td>
<td align="center"><a href="http://jeffbernstein.io"><img src="https://avatars1.githubusercontent.com/u/6685560?v=4" width="100px;" alt=""/><br /><sub><b>Jeff Bernstein</b></sub></a><br /><a href="https://github.com/testing-library/jest-dom/commits?author=jeffbernst" title="Documentation">📖</a></td>
</tr>

@@ -944,3 +945,2 @@ </table>

<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

@@ -947,0 +947,0 @@

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