React-testing-library: @types/testing-library__react"' has no exported member 'waitFor'

Created on 3 Jun 2020  路  6Comments  路  Source: testing-library/react-testing-library

Sorry, for duplicating issue #610 , but it looks like it was closed unresolved.

    "@testing-library/react": "10.0.5",
    "@testing-library/jest-dom": "5.9.0",
    "react": "16.13.1",

Relevant code or config:
import { waitFor } from '@testing-library/react';

What happened:
I get a typescript error:

@types/testing-library__react"' has no exported member 'waitFor'.ts(2305)

released

Most helpful comment

I'm definitely willing to accept a pull request to bring type definitions within this repo like we did with DOM Testing Library. That would help us avoid issues like this in the future.

All 6 comments

@matassp what version of @testing-library/dom is in your yarn.lock or package-lock.json?

The quickest way I found to fix this was to:

  1. Delete node_modules and your .lock file (yarn or package-lock)
  2. Install the dependencies again (npm install or yarn install)

IMO, I think this should be closed then. I can see this issue being annoying and uncertain but when it comes to dependency management and types on type of that this sort of comes with the territory.

I'm definitely willing to accept a pull request to bring type definitions within this repo like we did with DOM Testing Library. That would help us avoid issues like this in the future.

:tada: This issue has been resolved in version 10.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

julienw picture julienw  路  4Comments

jaredmeakin picture jaredmeakin  路  3Comments

chasen-bettinger picture chasen-bettinger  路  3Comments

addamove picture addamove  路  3Comments

bdauria picture bdauria  路  4Comments