Socket
Socket
Sign inDemoInstall

@testing-library/react

Package Overview
Dependencies
Maintainers
11
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@testing-library/react - npm Package Compare versions

Comparing version 9.1.3 to 9.1.4

6

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

@@ -45,6 +45,8 @@ 'use strict';

/* istanbul ignore next */
if (args[0].indexOf('Warning: Do not await the result of calling ReactTestUtils.act') === 0) {
var firstArgIsString = typeof args[0] === 'string';
if (firstArgIsString && args[0].indexOf('Warning: Do not await the result of calling ReactTestUtils.act') === 0) {
// v16.8.6
isAsyncActSupported = false;
} else if (!(args[0].indexOf('Warning: The callback passed to ReactTestUtils.act(...) function must not return anything') === 0)) {
} else if (!(firstArgIsString && args[0].indexOf('Warning: The callback passed to ReactTestUtils.act(...) function must not return anything') === 0)) {
originalConsoleError.apply(console, args);

@@ -51,0 +53,0 @@ }

@@ -40,6 +40,8 @@ import _regeneratorRuntime from '@babel/runtime/regenerator';

/* istanbul ignore next */
if (args[0].indexOf('Warning: Do not await the result of calling ReactTestUtils.act') === 0) {
var firstArgIsString = typeof args[0] === 'string';
if (firstArgIsString && args[0].indexOf('Warning: Do not await the result of calling ReactTestUtils.act') === 0) {
// v16.8.6
isAsyncActSupported = false;
} else if (!(args[0].indexOf('Warning: The callback passed to ReactTestUtils.act(...) function must not return anything') === 0)) {
} else if (!(firstArgIsString && args[0].indexOf('Warning: The callback passed to ReactTestUtils.act(...) function must not return anything') === 0)) {
originalConsoleError.apply(console, args);

@@ -46,0 +48,0 @@ }

@@ -46,6 +46,8 @@ "use strict";

/* istanbul ignore next */
if (args[0].indexOf('Warning: Do not await the result of calling ReactTestUtils.act') === 0) {
const firstArgIsString = typeof args[0] === 'string';
if (firstArgIsString && args[0].indexOf('Warning: Do not await the result of calling ReactTestUtils.act') === 0) {
// v16.8.6
isAsyncActSupported = false;
} else if (!(args[0].indexOf('Warning: The callback passed to ReactTestUtils.act(...) function must not return anything') === 0)) {
} else if (!(firstArgIsString && args[0].indexOf('Warning: The callback passed to ReactTestUtils.act(...) function must not return anything') === 0)) {
originalConsoleError.apply(console, args);

@@ -52,0 +54,0 @@ }

{
"name": "@testing-library/react",
"version": "9.1.3",
"version": "9.1.4",
"description": "Simple and complete React DOM testing utilities that encourage good testing practices.",

@@ -45,3 +45,3 @@ "main": "dist/index.js",

"@babel/runtime": "^7.5.5",
"@testing-library/dom": "^6.0.0",
"@testing-library/dom": "^6.1.0",
"@types/testing-library__react": "^9.1.0"

@@ -51,4 +51,4 @@ },

"@reach/router": "^1.2.1",
"@testing-library/jest-dom": "^4.0.0",
"kcd-scripts": "^1.5.2",
"@testing-library/jest-dom": "^4.1.0",
"kcd-scripts": "^1.7.0",
"react": "^16.9.0",

@@ -55,0 +55,0 @@ "react-dom": "^16.9.0"

<div align="center">
<h1>react-testing-library</h1>
<h1>React Testing Library</h1>

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

[**Read The Docs**](https://testing-library.com/react) |
[Edit the docs](https://github.com/alexkrolick/testing-library-docs)
[Edit the docs](https://github.com/testing-library/testing-library-docs)

@@ -33,3 +33,3 @@ <br />

[![All Contributors](https://img.shields.io/badge/all_contributors-96-orange.svg?style=flat-square)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-100-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc]

@@ -90,3 +90,3 @@ [![Join the community on Spectrum][spectrum-badge]][spectrum]

The `react-testing-library` is a very lightweight solution for testing React
The `React Testing Library` is a very lightweight solution for testing React
components. It provides light utility functions on top of `react-dom` and

@@ -177,3 +177,2 @@ `react-dom/test-utils`, in a way that encourages better testing practices. Its

// automatically. Learn more in the setup docs: https://testing-library.com/docs/react-testing-library/setup#cleanup
import '@testing-library/react/cleanup-after-each'
import '@testing-library/jest-dom/extend-expect'

@@ -259,3 +258,3 @@ // NOTE: jest-dom adds handy assertions to Jest and is recommended, but not required

{state.error ? <div role="alert">{state.error.message}</div> : null}
{state.success ? (
{state.resolved ? (
<div role="alert">Congrats! You're signed in!</div>

@@ -272,3 +271,2 @@ ) : null}

// your testing framework configuration rather than importing them in every file.
import '@testing-library/react/cleanup-after-each'
import '@testing-library/jest-dom/extend-expect'

@@ -321,3 +319,3 @@ import React from 'react'

You can also find react-testing-library examples at
You can also find React Testing Library examples at
[react-testing-examples.com](https://react-testing-examples.com/jest-rtl/).

@@ -328,8 +326,8 @@

If you are interested in testing a custom hook, check out
[react-hooks-testing-library][react-hooks-testing-library].
[React Hooks Testing Library][react-hooks-testing-library].
> NOTE it is not recommended to test single-use custom hooks in isolation from
> the components where it's being used. It's better to test the component that's
> using the hook rather than the hook itself. The react-hooks-testing-library is
> intended to be used for reusable hooks/libraries.
> using the hook rather than the hook itself. The `React Hooks Testing Library`
> is intended to be used for reusable hooks/libraries.

@@ -362,3 +360,3 @@ ## Guiding Principles

[**Read The Docs**](https://testing-library.com/react) |
[Edit the docs](https://github.com/alexkrolick/testing-library-docs)
[Edit the docs](https://github.com/testing-library/testing-library-docs)

@@ -517,3 +515,3 @@ ## Issues

<tr>
<td align="center"><a href="https://afontcu.dev"><img src="https://avatars0.githubusercontent.com/u/9197791?v=4" width="100px;" alt="Adrià Fontcuberta"/><br /><sub><b>Adrià Fontcuberta</b></sub></a><br /><a href="#review-afontcu" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://afontcu.dev"><img src="https://avatars0.githubusercontent.com/u/9197791?v=4" width="100px;" alt="Adrià Fontcuberta"/><br /><sub><b>Adrià Fontcuberta</b></sub></a><br /><a href="#review-afontcu" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=afontcu" title="Documentation">📖</a></td>
<td align="center"><a href="https://blog.johnnyreilly.com/"><img src="https://avatars0.githubusercontent.com/u/1010525?v=4" width="100px;" alt="John Reilly"/><br /><sub><b>John Reilly</b></sub></a><br /><a href="#review-johnnyreilly" title="Reviewed Pull Requests">👀</a></td>

@@ -523,3 +521,9 @@ <td align="center"><a href="https://michaeldeboey.be"><img src="https://avatars3.githubusercontent.com/u/6643991?v=4" width="100px;" alt="Michaël De Boey"/><br /><sub><b>Michaël De Boey</b></sub></a><br /><a href="#review-MichaelDeBoey" title="Reviewed Pull Requests">👀</a></td>

<td align="center"><a href="https://github.com/eventualbuddha"><img src="https://avatars3.githubusercontent.com/u/1938?v=4" width="100px;" alt="Brian Donovan"/><br /><sub><b>Brian Donovan</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=eventualbuddha" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/JaysQubeXon"><img src="https://avatars1.githubusercontent.com/u/18309230?v=4" width="100px;" alt="Noam Gabriel Jacobson"/><br /><sub><b>Noam Gabriel Jacobson</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=JaysQubeXon" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/rvdkooy"><img src="https://avatars1.githubusercontent.com/u/4119960?v=4" width="100px;" alt="Ronald van der Kooij"/><br /><sub><b>Ronald van der Kooij</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=rvdkooy" title="Tests">⚠️</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=rvdkooy" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/aayushrajvanshi"><img src="https://avatars0.githubusercontent.com/u/14968551?v=4" width="100px;" alt="Aayush Rajvanshi"/><br /><sub><b>Aayush Rajvanshi</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=aayushrajvanshi" title="Documentation">📖</a></td>
<td align="center"><a href="https://elyalamillo.com"><img src="https://avatars2.githubusercontent.com/u/24350492?v=4" width="100px;" alt="Ely Alamillo"/><br /><sub><b>Ely Alamillo</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=ely-alamillo" title="Code">💻</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=ely-alamillo" title="Tests">⚠️</a></td>
</tr>
</table>

@@ -570,4 +574,4 @@

[stackoverflow]: https://stackoverflow.com/questions/tagged/react-testing-library
[react-hooks-testing-library]: https://github.com/mpeyper/react-hooks-testing-library
[react-hooks-testing-library]: https://github.com/testing-library/react-hooks-testing-library
<!-- prettier-ignore-end -->

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