dom-testing-library
Advanced tools
Comparing version 2.8.0 to 2.9.0
@@ -10,7 +10,18 @@ 'use strict'; | ||
var queries = _interopRequireWildcard(_queries); | ||
var defaultQueries = _interopRequireWildcard(_queries); | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | ||
/** | ||
* @typedef {{[key: string]: Function}} FuncMap | ||
*/ | ||
/** | ||
* @param {HTMLElement} element container | ||
* @param {FuncMap} queries object of functions | ||
* @returns {FuncMap} returns object of functions bound to container | ||
*/ | ||
function getQueriesForElement(element) { | ||
var queries = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultQueries; | ||
return Object.entries(queries).reduce(function (helpers, _ref) { | ||
@@ -17,0 +28,0 @@ var key = _ref[0], |
{ | ||
"name": "dom-testing-library", | ||
"version": "2.8.0", | ||
"version": "2.9.0", | ||
"description": "Simple and complete DOM testing utilities that encourage good testing practices.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -15,2 +15,5 @@ import {Matcher} from './matches' | ||
element: HTMLElement, | ||
queriesToBind: | ||
| BoundFunctions<typeof queries> | ||
| BoundFunctions<typeof queries>[], | ||
): BoundFunctions<typeof queries> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
405643
4085