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

Convert tests to use react-testing-library instead of Enzyme #998

Merged
merged 11 commits into from
Aug 14, 2018

Conversation

markerikson
Copy link
Contributor

This is a cleaned-up and reworked version of @cellog 's changes from #996 . There were some funky merge issues in that branch/PR, and I wanted to start from a clean slate.

Prior to creating this branch, I reverted our two main source files (connectAdvanced.js and Provider.js) back to their 5.0.7 versions, as the 5.1.0-test1 code has been obviously busted in several ways.

This PR cleans up the tests so they're running (including disabling the <StrictMode> tests for now). I then copied over Greg's work porting the tests to use react-testing-library, and removed Enzyme.

At this point, all the tests should be passing. I did have to temporarily disable the ESLint react/no-deprecated rule to get it to stop complaining about our use of componentWillReceiveProps, as that lint error was killing the Travis build.

@markerikson
Copy link
Contributor Author

Aaaand we are all green! Merging.

@markerikson markerikson merged commit 47facdb into master Aug 14, 2018
@timdorr timdorr deleted the convert-tests-to-rtl branch August 14, 2018 13:02
josepot pushed a commit to josepot/react-redux-lean that referenced this pull request Sep 21, 2018
…#998)

* Update React to 16.4.2

* Restore other test changes from 5.1.0-test commit

* Fix tests that fail due to use of a string ref

* Disable <StrictMode> tests for now

* Add react-testing-library

* Convert Provider tests to RTL

* Convert Connect tests to RTL

* Remove uses of Enzyme and getTestDeps

* Remove Enzyme and react-test-renderer packages

* Fix a test lint error

* Disable lint warnings about componentWillReceiveProps
josepot pushed a commit to josepot/react-redux-lean that referenced this pull request Sep 21, 2018
…#998)

* Update React to 16.4.2

* Restore other test changes from 5.1.0-test commit

* Fix tests that fail due to use of a string ref

* Disable <StrictMode> tests for now

* Add react-testing-library

* Convert Provider tests to RTL

* Convert Connect tests to RTL

* Remove uses of Enzyme and getTestDeps

* Remove Enzyme and react-test-renderer packages

* Fix a test lint error

* Disable lint warnings about componentWillReceiveProps
@timdorr timdorr mentioned this pull request Oct 16, 2018
webguru7 pushed a commit to webguru7/react-redux that referenced this pull request Dec 8, 2022
…#998)

* Update React to 16.4.2

* Restore other test changes from 5.1.0-test commit

* Fix tests that fail due to use of a string ref

* Disable <StrictMode> tests for now

* Add react-testing-library

* Convert Provider tests to RTL

* Convert Connect tests to RTL

* Remove uses of Enzyme and getTestDeps

* Remove Enzyme and react-test-renderer packages

* Fix a test lint error

* Disable lint warnings about componentWillReceiveProps
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

1 participant