I switched from enzyme to testing-library about a year and half ago. I honestly don’t remember enzyme much already. I do enjoy testing library’s access methods.
I think if you’re not testing your code, you’re opening yourself to avoidable mistakes, bugs, and regression issues. It also makes it near impossible to collaborate with others on large scale projects.
I am working on react and react-native projects around 1 year. I have tried to learn testing with jest and ezyme. But sadly I haven't found friendly tutorial for them. I think the resource for testing react is less available then learning the react without testing.
You can use @wojtekmaj
/enzyme-adapter-react-17 while you're waiting for an official adapter :) Works perfectly for me so I've decided to share it with the community!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sadly we’re still waiting for the react 17 enzyme adapter. If you’re not - shame on you for not testing your code! 🤪
Would you still need that if you’re using testing-library/react?
My guess is no, as you’re not dependent on enzyme. But, I’d have to stand up a test project or look at the testing-library repo
I switched from enzyme to testing-library about a year and half ago. I honestly don’t remember enzyme much already. I do enjoy testing library’s access methods.
I should take a look! I primarily stick with jest because the test suites behave and are constructed for front end and back end (node) code.
It’s still jest. It’s just an alternative for rendering components to enzyme. Yeah try it out!
How important the testing is for react? Many small companies not doing that, is that a mistake they are making?
I think if you’re not testing your code, you’re opening yourself to avoidable mistakes, bugs, and regression issues. It also makes it near impossible to collaborate with others on large scale projects.
I am working on react and react-native projects around 1 year. I have tried to learn testing with jest and ezyme. But sadly I haven't found friendly tutorial for them. I think the resource for testing react is less available then learning the react without testing.
I can definitely help! There’s probably posts on here covering the topic or I could write something.
It would be very much appriciateable, thank you in advance.
You can use @wojtekmaj /enzyme-adapter-react-17 while you're waiting for an official adapter :) Works perfectly for me so I've decided to share it with the community!