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

Migrate tests away from enzyme to react-testing-library #524

Merged
merged 16 commits into from
Nov 12, 2018
Merged

Migrate tests away from enzyme to react-testing-library #524

merged 16 commits into from
Nov 12, 2018

Conversation

cellog
Copy link
Contributor

@cellog cellog commented Nov 11, 2018

Fixes #467

  • Updates the tests that used enzyme to use react-testing-library
  • removes enzyme and its adapter from package.json
  • fixes some issues with prop-types found when updating tests
  • fixes warnings from invalid html props or missing html props found when updating tests

 * migrate CreatorLock, Duration, ShowUnlessUserHasKeyToAnyLock,  Web3Provider, pages tests
 * fix invalid markup in EmbedCodeSnippet and Web3Provider
 * fix prop-types mismatches in tests, and missing shape for key and incorrect prop type for locks
Copy link
Member

@julien51 julien51 left a comment

Choose a reason for hiding this comment

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

Great job!
I think you'll probably need to update jest.setup.js to drop all enzyme references from there.
(One option would be to remove the file but it is likely that we'll need at some point in the future...)

After that we should be all good!

Copy link
Member

@julien51 julien51 left a comment

Choose a reason for hiding this comment

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

💯

@julien51
Copy link
Member

Thanks a lot @cellog !
Merging now!

@julien51 julien51 merged commit 3d02685 into unlock-protocol:master Nov 12, 2018
@cellog cellog deleted the migrate-to-rtl branch November 14, 2018 15:28
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.

React testing library vs. enzyme
2 participants