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

WIP: Add testing to modules #384

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

WIP: Add testing to modules #384

wants to merge 1 commit into from

Conversation

tompretty
Copy link
Contributor

What does this change?

Add testing to the modules (epics & banners). We want, for a start, a basic level of "smoke testing" to ensure changes that we make don't leave the components unable to render. As a first pass, I've added some a test with jest + react-testing-library to test if a component renders. However, this does not work (for catching an issue with accidently using server only code). Due to the environment the tests run in they still have access to e.g process.env.stage, which should only be used on the server. I think if we really want to test the components are working, we might need to run them in a production like environment: running dcr -> requesting and epic -> asserting it has rendered.

Copy link
Contributor

@michaelbjacobson michaelbjacobson 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!

@tomrf1
Copy link
Member

tomrf1 commented Jun 18, 2021

@tompretty shall we get this merged? It's a good starting point for rendering tests

@tomrf1 tomrf1 mentioned this pull request Aug 11, 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