@testing-library/dom
Advanced tools
Comparing version 6.10.1 to 6.11.0
@@ -1035,3 +1035,3 @@ 'use strict'; | ||
var defaultQueries = /*#__PURE__*/Object.freeze({ | ||
var queries = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
@@ -1098,9 +1098,9 @@ queryAllByLabelText: queryAllByLabelText, | ||
function getQueriesForElement(element, queries) { | ||
if (queries === void 0) { | ||
queries = defaultQueries; | ||
function getQueriesForElement(element, queries$1) { | ||
if (queries$1 === void 0) { | ||
queries$1 = queries; | ||
} | ||
return Object.keys(queries).reduce(function (helpers, key) { | ||
var fn = queries[key]; | ||
return Object.keys(queries$1).reduce(function (helpers, key) { | ||
var fn = queries$1[key]; | ||
helpers[key] = fn.bind(null, element); | ||
@@ -1965,2 +1965,10 @@ return helpers; | ||
var screen = typeof document !== 'undefined' && document.body ? getQueriesForElement(document.body) : Object.keys(queries).reduce(function (helpers, key) { | ||
helpers[key] = function () { | ||
throw new TypeError('For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error'); | ||
}; | ||
return helpers; | ||
}, {}); | ||
exports.bindElementToQueries = getQueriesForElement; | ||
@@ -2016,3 +2024,3 @@ exports.buildQueries = buildQueries; | ||
exports.prettyDOM = prettyDOM; | ||
exports.queries = defaultQueries; | ||
exports.queries = queries; | ||
exports.queryAllByAltText = queryAllByAltText; | ||
@@ -2037,2 +2045,3 @@ exports.queryAllByAttribute = queryAllByAttribute; | ||
exports.queryHelpers = queryHelpers; | ||
exports.screen = screen; | ||
exports.wait = waitWrapper; | ||
@@ -2039,0 +2048,0 @@ exports.waitForDomChange = waitForDomChangeWrapper; |
@@ -1029,3 +1029,3 @@ import _extends from '@babel/runtime/helpers/esm/extends'; | ||
var defaultQueries = /*#__PURE__*/Object.freeze({ | ||
var queries = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
@@ -1092,9 +1092,9 @@ queryAllByLabelText: queryAllByLabelText, | ||
function getQueriesForElement(element, queries) { | ||
if (queries === void 0) { | ||
queries = defaultQueries; | ||
function getQueriesForElement(element, queries$1) { | ||
if (queries$1 === void 0) { | ||
queries$1 = queries; | ||
} | ||
return Object.keys(queries).reduce(function (helpers, key) { | ||
var fn = queries[key]; | ||
return Object.keys(queries$1).reduce(function (helpers, key) { | ||
var fn = queries$1[key]; | ||
helpers[key] = fn.bind(null, element); | ||
@@ -1959,2 +1959,10 @@ return helpers; | ||
export { getQueriesForElement as bindElementToQueries, buildQueries, configure, createEvent, findAllByAltText, findAllByDisplayValue, findAllByLabelText, findAllByPlaceholderText, findAllByRole, findAllByTestId, findAllByText, findAllByTitle, findByAltText, findByDisplayValue, findByLabelText, findByPlaceholderText, findByRole, findByTestId, findByText, findByTitle, fireEvent, getAllByAltText, getAllByDisplayValue, getAllByLabelText, getAllByPlaceholderText, getAllByRole, getAllByTestId, getAllByText, getAllByTitle, getByAltText, getByDisplayValue, getByLabelText, getByPlaceholderText, getByRole, getByTestId, getByText, getByTitle, getDefaultNormalizer, getElementError, getMultipleElementsFoundError, getNodeText, getQueriesForElement, getRoles, isInaccessible, logDOM, logRoles, makeFindQuery, makeGetAllQuery, makeSingleQuery, prettyDOM, defaultQueries as queries, queryAllByAltText, queryAllByAttribute, queryAllByDisplayValue, queryAllByLabelText, queryAllByPlaceholderText, queryAllByRole, queryAllByTestId, queryAllByText, queryAllByTitle, queryByAltText, queryByAttribute, queryByDisplayValue, queryByLabelText, queryByPlaceholderText, queryByRole, queryByTestId, queryByText, queryByTitle, queryHelpers, waitWrapper as wait, waitForDomChangeWrapper as waitForDomChange, waitForElementWrapper as waitForElement, waitForElementToBeRemovedWrapper as waitForElementToBeRemoved, getQueriesForElement as within }; | ||
var screen = typeof document !== 'undefined' && document.body ? getQueriesForElement(document.body) : Object.keys(queries).reduce(function (helpers, key) { | ||
helpers[key] = function () { | ||
throw new TypeError('For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error'); | ||
}; | ||
return helpers; | ||
}, {}); | ||
export { getQueriesForElement as bindElementToQueries, buildQueries, configure, createEvent, findAllByAltText, findAllByDisplayValue, findAllByLabelText, findAllByPlaceholderText, findAllByRole, findAllByTestId, findAllByText, findAllByTitle, findByAltText, findByDisplayValue, findByLabelText, findByPlaceholderText, findByRole, findByTestId, findByText, findByTitle, fireEvent, getAllByAltText, getAllByDisplayValue, getAllByLabelText, getAllByPlaceholderText, getAllByRole, getAllByTestId, getAllByText, getAllByTitle, getByAltText, getByDisplayValue, getByLabelText, getByPlaceholderText, getByRole, getByTestId, getByText, getByTitle, getDefaultNormalizer, getElementError, getMultipleElementsFoundError, getNodeText, getQueriesForElement, getRoles, isInaccessible, logDOM, logRoles, makeFindQuery, makeGetAllQuery, makeSingleQuery, prettyDOM, queries, queryAllByAltText, queryAllByAttribute, queryAllByDisplayValue, queryAllByLabelText, queryAllByPlaceholderText, queryAllByRole, queryAllByTestId, queryAllByText, queryAllByTitle, queryByAltText, queryByAttribute, queryByDisplayValue, queryByLabelText, queryByPlaceholderText, queryByRole, queryByTestId, queryByText, queryByTitle, queryHelpers, screen, waitWrapper as wait, waitForDomChangeWrapper as waitForDomChange, waitForElementWrapper as waitForElement, waitForElementToBeRemovedWrapper as waitForElementToBeRemoved, getQueriesForElement as within }; |
@@ -184,2 +184,15 @@ "use strict"; | ||
var _screen = require("./screen"); | ||
Object.keys(_screen).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function () { | ||
return _screen[key]; | ||
} | ||
}); | ||
}); | ||
var _roleHelpers = require("./role-helpers"); | ||
@@ -186,0 +199,0 @@ |
{ | ||
"name": "@testing-library/dom", | ||
"version": "6.10.1", | ||
"version": "6.11.0", | ||
"description": "Simple and complete DOM testing utilities that encourage good testing practices.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1667240
35
15224