Closed
Description
DOM Testing Library
version: 6.3.0@types/testing-library__dom
version: 6.10.0node
version: 12.13.0yarn
version: 1.19.1
Relevant code or config:
const element = getByText(container, text, { ignore: 'script, style, a' }
What you did:
I tried to use the ignore
option in a *ByText
query using TypeScript.
What happened:
I get this TypeScript error: Argument of type '{ ignore: string; }' is not assignable to parameter of type 'SelectorMatcherOptions'. Object literal may only specify known properties, and 'ignore' does not exist in type 'SelectorMatcherOptions'
Reproduction:
https://codesandbox.io/s/dom-testing-library-template-eldsw
Problem description:
Type definitions seem to be missing ignore
option for *ByText
queries.
Suggested solution:
Adding the missing types.
Metadata
Metadata
Assignees
Labels
No labels