-
Notifications
You must be signed in to change notification settings - Fork 18
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
CookieProvider not re-rendering component with jest and react-testing-library #227
Comments
I am having the same issue with jest and RTL. |
This comment on a different issue solved it for me: #113 (comment) |
In |
@eXon Thanks! Hmm, it doesn’t seem to be fixed for me… |
For me too, the solution from the issue above doesn't work with typescript. |
@mocantimoteidavid this is a good place for @ts-ignore, IMO |
Should be fixed on the next version |
Released with |
I implemented one of those GDPR cookie banners. When you click a button it dismisses the banner and sets a cookie so we know not to show it again.
Here’s the code (I’ve simplified it a bit for clarity):
This all works when testing manually, but for some reason it doesn’t seem to work when I write an automated test for it.
As best I can tell, when
setCookie
is called in the click handler, it’s not re-rendering the component.Is there something I’m doing wrong or is this a bug?
The text was updated successfully, but these errors were encountered: