Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
debug: (el = document.body) => console.log(prettyDOM(el)),
...getQueriesForElement(document.body),
debug: (el = document.body) => console.log(prettyDOM(el)),
...getQueriesForElement(document.body),
if (timeout > 0) {
result = await waitForQueryResult(
queryResult,
{ timeout, expectEmpty, element, message }
)
} else {
result = queryResult()
}
if (result && result.length > 0) {
return result
} else if (!expectEmpty) {
throw new Error(
[
`[ui-test-utils] No matches found for Element query... ${message}`,
prettyDOM(element, 7000, { highlight: false })
]
.filter(Boolean).join('\n\n')
)
} else {
return []
}
}