Closed
Description
DOM Testing Library
version:node
version:npm
(oryarn
) version:
Relevant code or config:
queryByPlaceholderText,
getAllByPlaceholderText,
getByPlaceholderText,
findAllByPlaceholderText,
findByPlaceholderText,
] = buildQueries(queryAllByPlaceholderText, getMultipleError, getMissingError)
looks like this abstraction is confusing TS, not sure although
await waitForElementToBeRemoved(getByPlaceholderText(t('auth.signin.fields.email.placeholder')) as any)
What you did:
I'm using typescript and testing-library, when trying to wait for an HTML Element to be removed, I need to pass hard-coded ```any`` type to the element, otherwise Typescript is gonna validate an invalid argument for the function.
What happened:
Argument of type 'HTMLElement' is not assignable to parameter of type '() => unknown'.
Type 'HTMLElement' provides no match for the signature '(): unknown'.ts(2345)
Reproduction:
Problem description:
Suggested solution:
Metadata
Metadata
Assignees
Labels
No labels