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

Refactor lesson token test to use shallow rendering #40866

Merged
merged 6 commits into from
Jun 2, 2021

Conversation

davidsbailey
Copy link
Member

The goal of this PR is to eliminate the use of mount in a unit test, replacing it with shallow. In this case, the strategy is to extract a subcomponent. See react testing practical guide for context.

@davidsbailey davidsbailey requested a review from a team June 1, 2021 16:40
Copy link
Contributor

@Hamms Hamms left a comment

Choose a reason for hiding this comment

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

This looks great! I do think that breaking things up into subcomponents is a pattern that we'll want to enthusiastically embrace; not just as a part of improving our testing situation, but also as a generally good React development pattern!

@davidsbailey davidsbailey merged commit 8a996ba into staging Jun 2, 2021
@davidsbailey davidsbailey deleted the refactor-lesson-token-test branch June 2, 2021 00:02
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.

None yet

2 participants