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

@testing-library/react

Package Overview
Dependencies
Maintainers
12
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 10.1.0 to 10.2.0

54

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

@@ -395,3 +395,3 @@ 'use strict';

// then we'll automatically run cleanup afterEach test
// or teardown then we'll automatically run cleanup afterEach test
// this ensures that tests run in isolation from each other

@@ -401,18 +401,42 @@ // if you don't like this then either import the `pure` module

if (typeof afterEach === 'function' && !process.env.RTL_SKIP_AUTO_CLEANUP) {
afterEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
return _regeneratorRuntime.wrap(function (_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return cleanup();
if (!process.env.RTL_SKIP_AUTO_CLEANUP) {
// ignore teardown() in code coverage because Jest does not support it
case 2:
case "end":
return _context.stop();
/* istanbul ignore else */
if (typeof afterEach === 'function') {
afterEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
return _regeneratorRuntime.wrap(function (_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return cleanup();
case 2:
case "end":
return _context.stop();
}
}
}
}, _callee);
})));
}, _callee);
})));
} else if (typeof teardown === 'function') {
// Block is guarded by `typeof` check.
// eslint does not support `typeof` guards.
// eslint-disable-next-line no-undef
teardown( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
return _regeneratorRuntime.wrap(function (_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return cleanup();
case 2:
case "end":
return _context2.stop();
}
}
}, _callee2);
})));
}
}

@@ -419,0 +443,0 @@

@@ -390,3 +390,3 @@ import _regeneratorRuntime from '@babel/runtime/regenerator';

// then we'll automatically run cleanup afterEach test
// or teardown then we'll automatically run cleanup afterEach test
// this ensures that tests run in isolation from each other

@@ -396,20 +396,44 @@ // if you don't like this then either import the `pure` module

if (typeof afterEach === 'function' && !process.env.RTL_SKIP_AUTO_CLEANUP) {
afterEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
return _regeneratorRuntime.wrap(function (_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return cleanup();
if (!process.env.RTL_SKIP_AUTO_CLEANUP) {
// ignore teardown() in code coverage because Jest does not support it
case 2:
case "end":
return _context.stop();
/* istanbul ignore else */
if (typeof afterEach === 'function') {
afterEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
return _regeneratorRuntime.wrap(function (_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return cleanup();
case 2:
case "end":
return _context.stop();
}
}
}
}, _callee);
})));
}, _callee);
})));
} else if (typeof teardown === 'function') {
// Block is guarded by `typeof` check.
// eslint does not support `typeof` guards.
// eslint-disable-next-line no-undef
teardown( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
return _regeneratorRuntime.wrap(function (_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return cleanup();
case 2:
case "end":
return _context2.stop();
}
}
}, _callee2);
})));
}
}
export { act, cleanup, fireEvent, render };

@@ -20,10 +20,22 @@ "use strict";

// if we're running in a test runner that supports afterEach
// then we'll automatically run cleanup afterEach test
// or teardown then we'll automatically run cleanup afterEach test
// this ensures that tests run in isolation from each other
// if you don't like this then either import the `pure` module
// or set the RTL_SKIP_AUTO_CLEANUP env variable to 'true'.
if (typeof afterEach === 'function' && !process.env.RTL_SKIP_AUTO_CLEANUP) {
afterEach(async () => {
await (0, _pure.cleanup)();
});
if (!process.env.RTL_SKIP_AUTO_CLEANUP) {
// ignore teardown() in code coverage because Jest does not support it
/* istanbul ignore else */
if (typeof afterEach === 'function') {
afterEach(async () => {
await (0, _pure.cleanup)();
});
} else if (typeof teardown === 'function') {
// Block is guarded by `typeof` check.
// eslint does not support `typeof` guards.
// eslint-disable-next-line no-undef
teardown(async () => {
await (0, _pure.cleanup)();
});
}
}
{
"name": "@testing-library/react",
"version": "10.1.0",
"version": "10.2.0",
"description": "Simple and complete React DOM testing utilities that encourage good testing practices.",

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

@@ -539,2 +539,3 @@ <div align="center">

<td align="center"><a href="https://github.com/samtsai"><img src="https://avatars0.githubusercontent.com/u/225526?v=4" width="100px;" alt=""/><br /><sub><b>Sam Tsai</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=samtsai" title="Code">๐Ÿ’ป</a> <a href="https://github.com/testing-library/react-testing-library/commits?author=samtsai" title="Tests">โš ๏ธ</a></td>
<td align="center"><a href="https://www.echooff.dev"><img src="https://avatars0.githubusercontent.com/u/149248?v=4" width="100px;" alt=""/><br /><sub><b>Christian Rackerseder</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=screendriver" title="Code">๐Ÿ’ป</a></td>
</tr>

@@ -541,0 +542,0 @@ </table>

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