Socket
Socket
Sign inDemoInstall

@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 9.3.3 to 9.4.0

103

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

@@ -8,3 +8,2 @@ 'use strict';

var _regeneratorRuntime = _interopDefault(require('@babel/runtime/regenerator'));
var _asyncToGenerator = _interopDefault(require('@babel/runtime/helpers/asyncToGenerator'));
var _extends = _interopDefault(require('@babel/runtime/helpers/extends'));

@@ -183,50 +182,38 @@ var React = _interopDefault(require('react'));

dom.configure({
asyncWrapper: function () {
var _asyncWrapper = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee2(cb) {
var result;
return _regeneratorRuntime.wrap(function (_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return asyncAct(
/*#__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 cb();
asyncWrapper: function asyncWrapper(cb) {
var result;
return _regeneratorRuntime.async(function (_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return _regeneratorRuntime.awrap(asyncAct(function () {
return _regeneratorRuntime.async(function (_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return _regeneratorRuntime.awrap(cb());
case 2:
result = _context.sent;
case 2:
result = _context.sent;
case 3:
case "end":
return _context.stop();
}
case 3:
case "end":
return _context.stop();
}
}, _callee);
})));
}
});
}));
case 2:
return _context2.abrupt("return", result);
case 2:
return _context2.abrupt("return", result);
case 3:
case "end":
return _context2.stop();
}
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function asyncWrapper() {
return _asyncWrapper.apply(this, arguments);
};
}()
}
});
}
});

@@ -236,10 +223,10 @@ var mountedContainers = new Set();

function render(ui, _temp) {
var _ref2 = _temp === void 0 ? {} : _temp,
container = _ref2.container,
_ref2$baseElement = _ref2.baseElement,
baseElement = _ref2$baseElement === void 0 ? container : _ref2$baseElement,
queries = _ref2.queries,
_ref2$hydrate = _ref2.hydrate,
hydrate = _ref2$hydrate === void 0 ? false : _ref2$hydrate,
WrapperComponent = _ref2.wrapper;
var _ref = _temp === void 0 ? {} : _temp,
container = _ref.container,
_ref$baseElement = _ref.baseElement,
baseElement = _ref$baseElement === void 0 ? container : _ref$baseElement,
queries = _ref.queries,
_ref$hydrate = _ref.hydrate,
hydrate = _ref$hydrate === void 0 ? false : _ref$hydrate,
WrapperComponent = _ref.wrapper;

@@ -385,8 +372,4 @@ if (!baseElement) {

if (typeof afterEach === 'function' && !process.env.RTL_SKIP_AUTO_CLEANUP) {
afterEach(
/*#__PURE__*/
_asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee() {
return _regeneratorRuntime.wrap(function (_context) {
afterEach(function () {
return _regeneratorRuntime.async(function (_context) {
while (1) {

@@ -396,3 +379,3 @@ switch (_context.prev = _context.next) {

_context.next = 2;
return flushMicroTasks();
return _regeneratorRuntime.awrap(flushMicroTasks());

@@ -407,4 +390,4 @@ case 2:

}
}, _callee);
})));
});
});
}

@@ -411,0 +394,0 @@

import _regeneratorRuntime from '@babel/runtime/regenerator';
import _asyncToGenerator from '@babel/runtime/helpers/esm/asyncToGenerator';
import _extends from '@babel/runtime/helpers/esm/extends';

@@ -177,50 +176,38 @@ import React from 'react';

configure({
asyncWrapper: function () {
var _asyncWrapper = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee2(cb) {
var result;
return _regeneratorRuntime.wrap(function (_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return asyncAct(
/*#__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 cb();
asyncWrapper: function asyncWrapper(cb) {
var result;
return _regeneratorRuntime.async(function (_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return _regeneratorRuntime.awrap(asyncAct(function () {
return _regeneratorRuntime.async(function (_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return _regeneratorRuntime.awrap(cb());
case 2:
result = _context.sent;
case 2:
result = _context.sent;
case 3:
case "end":
return _context.stop();
}
case 3:
case "end":
return _context.stop();
}
}, _callee);
})));
}
});
}));
case 2:
return _context2.abrupt("return", result);
case 2:
return _context2.abrupt("return", result);
case 3:
case "end":
return _context2.stop();
}
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function asyncWrapper() {
return _asyncWrapper.apply(this, arguments);
};
}()
}
});
}
});

@@ -230,10 +217,10 @@ var mountedContainers = new Set();

function render(ui, _temp) {
var _ref2 = _temp === void 0 ? {} : _temp,
container = _ref2.container,
_ref2$baseElement = _ref2.baseElement,
baseElement = _ref2$baseElement === void 0 ? container : _ref2$baseElement,
queries = _ref2.queries,
_ref2$hydrate = _ref2.hydrate,
hydrate = _ref2$hydrate === void 0 ? false : _ref2$hydrate,
WrapperComponent = _ref2.wrapper;
var _ref = _temp === void 0 ? {} : _temp,
container = _ref.container,
_ref$baseElement = _ref.baseElement,
baseElement = _ref$baseElement === void 0 ? container : _ref$baseElement,
queries = _ref.queries,
_ref$hydrate = _ref.hydrate,
hydrate = _ref$hydrate === void 0 ? false : _ref$hydrate,
WrapperComponent = _ref.wrapper;

@@ -379,8 +366,4 @@ if (!baseElement) {

if (typeof afterEach === 'function' && !process.env.RTL_SKIP_AUTO_CLEANUP) {
afterEach(
/*#__PURE__*/
_asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee() {
return _regeneratorRuntime.wrap(function (_context) {
afterEach(function () {
return _regeneratorRuntime.async(function (_context) {
while (1) {

@@ -390,3 +373,3 @@ switch (_context.prev = _context.next) {

_context.next = 2;
return flushMicroTasks();
return _regeneratorRuntime.awrap(flushMicroTasks());

@@ -401,6 +384,6 @@ case 2:

}
}, _callee);
})));
});
});
}
export { act, cleanup, fireEvent, render };

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

var _regeneratorRuntime = _interopDefault(require('@babel/runtime/regenerator'));
var _asyncToGenerator = _interopDefault(require('@babel/runtime/helpers/asyncToGenerator'));
var React = _interopDefault(require('react'));

@@ -137,50 +136,38 @@ var ReactDOM = _interopDefault(require('react-dom'));

dom.configure({
asyncWrapper: function () {
var _asyncWrapper = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee2(cb) {
var result;
return _regeneratorRuntime.wrap(function (_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return asyncAct(
/*#__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 cb();
asyncWrapper: function asyncWrapper(cb) {
var result;
return _regeneratorRuntime.async(function (_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return _regeneratorRuntime.awrap(asyncAct(function () {
return _regeneratorRuntime.async(function (_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return _regeneratorRuntime.awrap(cb());
case 2:
result = _context.sent;
case 2:
result = _context.sent;
case 3:
case "end":
return _context.stop();
}
case 3:
case "end":
return _context.stop();
}
}, _callee);
})));
}
});
}));
case 2:
return _context2.abrupt("return", result);
case 2:
return _context2.abrupt("return", result);
case 3:
case "end":
return _context2.stop();
}
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function asyncWrapper() {
return _asyncWrapper.apply(this, arguments);
};
}()
}
});
}
});

@@ -190,10 +177,10 @@ var mountedContainers = new Set();

function render(ui, _temp) {
var _ref2 = _temp === void 0 ? {} : _temp,
container = _ref2.container,
_ref2$baseElement = _ref2.baseElement,
baseElement = _ref2$baseElement === void 0 ? container : _ref2$baseElement,
queries = _ref2.queries,
_ref2$hydrate = _ref2.hydrate,
hydrate = _ref2$hydrate === void 0 ? false : _ref2$hydrate,
WrapperComponent = _ref2.wrapper;
var _ref = _temp === void 0 ? {} : _temp,
container = _ref.container,
_ref$baseElement = _ref.baseElement,
baseElement = _ref$baseElement === void 0 ? container : _ref$baseElement,
queries = _ref.queries,
_ref$hydrate = _ref.hydrate,
hydrate = _ref$hydrate === void 0 ? false : _ref$hydrate,
WrapperComponent = _ref.wrapper;

@@ -200,0 +187,0 @@ if (!baseElement) {

import _extends from '@babel/runtime/helpers/esm/extends';
import _regeneratorRuntime from '@babel/runtime/regenerator';
import _asyncToGenerator from '@babel/runtime/helpers/esm/asyncToGenerator';
import React from 'react';

@@ -131,50 +130,38 @@ import ReactDOM from 'react-dom';

configure({
asyncWrapper: function () {
var _asyncWrapper = _asyncToGenerator(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee2(cb) {
var result;
return _regeneratorRuntime.wrap(function (_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return asyncAct(
/*#__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 cb();
asyncWrapper: function asyncWrapper(cb) {
var result;
return _regeneratorRuntime.async(function (_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return _regeneratorRuntime.awrap(asyncAct(function () {
return _regeneratorRuntime.async(function (_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return _regeneratorRuntime.awrap(cb());
case 2:
result = _context.sent;
case 2:
result = _context.sent;
case 3:
case "end":
return _context.stop();
}
case 3:
case "end":
return _context.stop();
}
}, _callee);
})));
}
});
}));
case 2:
return _context2.abrupt("return", result);
case 2:
return _context2.abrupt("return", result);
case 3:
case "end":
return _context2.stop();
}
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function asyncWrapper() {
return _asyncWrapper.apply(this, arguments);
};
}()
}
});
}
});

@@ -184,10 +171,10 @@ var mountedContainers = new Set();

function render(ui, _temp) {
var _ref2 = _temp === void 0 ? {} : _temp,
container = _ref2.container,
_ref2$baseElement = _ref2.baseElement,
baseElement = _ref2$baseElement === void 0 ? container : _ref2$baseElement,
queries = _ref2.queries,
_ref2$hydrate = _ref2.hydrate,
hydrate = _ref2$hydrate === void 0 ? false : _ref2$hydrate,
WrapperComponent = _ref2.wrapper;
var _ref = _temp === void 0 ? {} : _temp,
container = _ref.container,
_ref$baseElement = _ref.baseElement,
baseElement = _ref$baseElement === void 0 ? container : _ref$baseElement,
queries = _ref.queries,
_ref$hydrate = _ref.hydrate,
hydrate = _ref$hydrate === void 0 ? false : _ref$hydrate,
WrapperComponent = _ref.wrapper;

@@ -194,0 +181,0 @@ if (!baseElement) {

@@ -23,7 +23,2 @@ "use strict";

// if we're running in a test runner that supports afterEach
// 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) {

@@ -30,0 +25,0 @@ afterEach(async () => {

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

@@ -48,11 +48,11 @@ "main": "dist/index.js",

"dependencies": {
"@babel/runtime": "^7.6.0",
"@testing-library/dom": "^6.3.0",
"@types/testing-library__react": "^9.1.0"
"@babel/runtime": "^7.7.6",
"@testing-library/dom": "^6.11.0",
"@types/testing-library__react": "^9.1.2"
},
"devDependencies": {
"@reach/router": "^1.2.1",
"@testing-library/jest-dom": "^4.1.0",
"cross-env": "^6.0.0",
"kcd-scripts": "^1.7.0",
"@testing-library/jest-dom": "^4.2.4",
"cross-env": "^6.0.3",
"kcd-scripts": "^1.12.1",
"npm-run-all": "^4.1.5",

@@ -59,0 +59,0 @@ "react": "^16.9.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

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