Skip to content

[#1807] Added ThemeProvider for tests #1808

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

Merged
merged 2 commits into from
Mar 18, 2021
Merged

[#1807] Added ThemeProvider for tests #1808

merged 2 commits into from
Mar 18, 2021

Conversation

smitbarmase
Copy link
Contributor

Fixes #1807

Using styled-components and function like prop from theme.js, was failing tests as we haven't wrapped the render function from @testing-library in test-utils.js.

I added ThemeProvider and provided the default theme light to it for testing. Similar to I18nextProvider is already wrapping it to provide default translation.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • is from a uniquely-named feature branch and has been rebased on top of the latest develop branch. (If I was asked to make more changes, I have made sure to rebase onto develop then too)
  • is descriptively named and links to an issue number, i.e. Fixes #123

@release-com
Copy link

release-com bot commented Mar 15, 2021

Release Environments

p5.js-web-editor
app-ted9fd7-p5-js-web-editor.releaseapp.io

@catarak
Copy link
Member

catarak commented Mar 18, 2021

Oh awesome! Thanks for working on this.

@catarak catarak merged commit dd433b7 into processing:develop Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests failing when used styled-components because not wrapped with ThemeProvider
2 participants