-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userEvent.type generating "not a function" error #304
userEvent.type generating "not a function" error #304
Comments
Having this as well!
|
As mentioned in the release notes the latest version of This was a breaking change and was released as a major version. Upgrade your version of One note is that |
Awesome, thanks @kentcdodds - apologies for not checking the versions. It's hard sometimes to keep up with all the changes in this ecosystem. :) |
This might be project related, but any reason someone could think of that the latest version of @testing-library/dom is not being installed with @testing-library/react? I had to install @testing-library/dom manually in order to get things to work... |
That can happen when your lockfile keeps the older version |
Ya, that was it. Thanks. Deleted the lockfile, removed node modules, and installed modules fresh (which created and new lockfile) and all was good.
…Sent from my iPhone
On Jun 5, 2020, at 5:25 PM, Kent C. Dodds ***@***.***> wrote:
That can happen when your lockfile keeps the older version
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@kentcdodds are the versions correct? I've just been spinning my wheels with the same error. I think the minimum dependency is not Which was released in 7.16.0. So I'm pretty sure this needs bumping: https://github.com/testing-library/user-event/blob/master/package.json#L51 |
Ah yeah, that was a mistake in the latest release. That should be updated. Want to fix that? |
Yep I'll send a PR in a bit |
🎉 This issue has been resolved in version 12.0.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
I'm using @testing-library/svelte and seeing this issue as well. In package-lock.json, it shows a dependency on @testing-library/dom of ^7.0.3 |
Seeing this with the latest versions
|
still having same issues :S |
I was having the same issues, but due to a race condition between
|
Having same issues with |
@testing-library/user-event
version: ^11.0.0render
from @testing-library/react ^10.0.4Relevant code or config
What you did: Executed the above code via the command line (OSX, Node v. 12.16.3)
What happened: I received the following error:
I have checked and
screen.getByRole('textbox'), '4-mile');
does definitely find the correct textbox. Also,userEvent
exists and has theasync type
method on it. Several other tests in the same file work - this error only shows up for the one instance where I'm usinguserEvent.type
.Even if I comment out all the expects, that one line still throws the same error.
The component is a very large parent with a bunch of children, and I'm under NDA so I can't really make the whole thing available, but I haven't been able to fix anything by tweaking the tag itself on the React side of things.
Reproduction repository: n/a
Problem description: I'm willing to concede I may be using
userEvent.type
incorrectly, but ... it doesn't seem like it?Suggested solution: Your guess is as good as mine.
The text was updated successfully, but these errors were encountered: