dom-testing-library version: 10node version: 12.16.0yarn version: 1.22Relevant code or config
import { waitFor } from '@testing-library/dom';
What happened:
TS2305: Module '"../../../node_modules/@types/testing-library__dom"'
has no exported member 'waitFor'.
Problem description: saw the deprecation warnings after upgrading to latest version, tried to take the action suggested in the message, ran into this problem.
Suggested solution: add the type in testing_library__dom?
Already in the pipeline over at @types/: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43102
Thanks!
While you're waiting, you can drop this into your own project to extend the existing definitions.
declare module '@testing-library/dom' {
export function waitFor(
callback: () => void,
options?: {
container?: HTMLElement;
timeout?: number;
interval?: number;
mutationObserverOptions?: MutationObserverInit;
},
): Promise<void>;
}
Definition copy/pasted from @abraham's PR linked above.
Most helpful comment
Already in the pipeline over at
@types/: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43102