diff --git a/src/index.js b/src/index.js index 6c63f002..d8258a23 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,7 @@ import {getQueriesForElement, prettyDOM} from 'dom-testing-library' const mountedContainers = new Set() -function render(ui, {container, baseElement = container} = {}) { +function render(ui, {container, baseElement = container, queries} = {}) { if (!container) { // default to document.body instead of documentElement to avoid output of potentially-large // head elements (such as JSS style blocks) in debug output @@ -29,7 +29,7 @@ function render(ui, {container, baseElement = container} = {}) { // Intentionally do not return anything to avoid unnecessarily complicating the API. // folks can use all the same utilities we return in the first place that are bound to the container }, - ...getQueriesForElement(baseElement), + ...getQueriesForElement(baseElement, queries), } }