AaronCCWong / react-card-flip

React component for card flipping animation.
https://aaronccwong.github.io/react-card-flip
MIT License
337 stars 64 forks source link

Migrating Enzyme tests to react-testing-library (adding support for React 18) #108

Closed dododevs closed 1 year ago

dododevs commented 1 year ago

I have taken on issue #100 and migrated all component unit tests to react-testing-library. This should solve the dependency issue that prevented this library from being compatible with React >=18. I have run the modified tests and they are passing on my machine. Only the unit test suite is succeeding though. The e2e tests with puppeteer all result in timeout failure. I have found the same behavior on this repo though (master, freshly cloned), therefore I'm submitting this pull request anyway. Hope this helps!

mezei commented 1 year ago

Great job with this one, appreciate the effort. One question though: Why the change to React v18 in peer deps? As I understand this version should still work in React v17 environments. Best would be to have peer deps as lax as possible.

Now to get @AaronCCWong to review :)

AaronCCWong commented 1 year ago

Awesome! Thanks for the PR!