Skip to content
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

Fix tests related to Enzyme and React Context API #12625

Closed
willdurand opened this issue Nov 6, 2018 · 1 comment
Closed

Fix tests related to Enzyme and React Context API #12625

willdurand opened this issue Nov 6, 2018 · 1 comment
Labels
component:code_quality component:testing migration:no-jira migration:2024 qa:not_needed repository:addons-frontend Issue relating to addons-frontend state:stale Issues marked as stale. These can be re-opened should there be plans to fix them.

Comments

@willdurand
Copy link
Member

In #12611, we upgraded react-cookie, which relies on the React stable Context API. Enzyme does not support it though (not for shallow rendering): enzymejs/enzyme#1647.

The workaround is to disable the HOC (with jest.mock) and to inject cookies to the component under test manually. Ideally, we should not have to do this. Once Enzyme supports the Context API better, we should remove those workarounds.

@stale
Copy link

stale bot commented Jan 1, 2020

This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.

@stale stale bot added the state:stale Issues marked as stale. These can be re-opened should there be plans to fix them. label Jan 1, 2020
@stale stale bot closed this as completed Jan 15, 2020
@KevinMind KevinMind transferred this issue from mozilla/addons-frontend May 5, 2024
@KevinMind KevinMind added repository:addons-frontend Issue relating to addons-frontend migration:2024 labels May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:code_quality component:testing migration:no-jira migration:2024 qa:not_needed repository:addons-frontend Issue relating to addons-frontend state:stale Issues marked as stale. These can be re-opened should there be plans to fix them.
Projects
None yet
Development

No branches or pull requests

2 participants