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

Add basic setup for unit testing components with sass files import #126

Merged
merged 2 commits into from
Mar 19, 2021
Merged

Conversation

renjithgr
Copy link
Contributor

@renjithgr renjithgr commented Mar 19, 2021

Summary

Yesterday, I submitted a PR (#84) for adding email as an option for the property type. But I didn't write any unit tests as part of it, and @jespino agreed it is okay to submit the unit tests as a separate PR. This PR contains a basic unit test for the propertyMenu.tsx file I changed as part of yesterday's PR.

I had to change the Jest config to provide a mock in place of sass files imported by components.

Once this PR is in, I would be happy to add more unit tests.

@mattermod
Copy link
Contributor

Hello @renjithgr,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

@@ -32,6 +32,9 @@
"react-simplemde-editor": "^4.1.3"
},
"jest": {
"moduleNameMapper": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, thanks!

Copy link
Contributor

@jespino jespino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @renjithgr! 🎊

@jespino jespino merged commit bea14c9 into mattermost-community:main Mar 19, 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.

3 participants