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

Tests: Remove redundant ThemeProvider from tests #4514

Open
siddharthkp opened this issue Apr 19, 2024 · 2 comments · May be fixed by #5301
Open

Tests: Remove redundant ThemeProvider from tests #4514

siddharthkp opened this issue Apr 19, 2024 · 2 comments · May be fixed by #5301

Comments

@siddharthkp
Copy link
Member

siddharthkp commented Apr 19, 2024

There are multiple tests that wrap the rendered component with ThemeProvider: https://github.com/search?q=repo%3Aprimer%2Freact+%3CThemeProvider+path%3Atest.tsx&type=code

We do not have to do this anymore because we already wrap all stories in a ThemeProvider in preview.js.

Note: There might be a couple exceptions so make sure to test this by switching themes in storybook

@lesliecdubs
Copy link
Member

👋 What is the impact of the redundant ThemeProvider in tests? Is this a "nice-to-have" quality of life improvement?

@siddharthkp
Copy link
Member Author

Is this a "nice-to-have" quality of life improvement?

Yep, I'd say this is nice to have. I don't think there are any bugs that are missed because of this redundancy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants