DEV Community

Nana Adjei Manu
Nana Adjei Manu

Posted on

I refactored a large codebase from Enzyme to React testing library. Ask me anything

Discussion (6)

Collapse
pavermakov profile image
Pavel Ermakov

What was wrong with enzyme?

Collapse
claeusdev profile image
Nana Adjei Manu Ask Me Anything

Nothing really, we figured we could get much more value out of using testing library because we could actually test out how a user would interact with our app other than just using our usual snapshot tests.

Collapse
narendersaini32 profile image
Narender Saini

why you prefer react testing library over enzyme ?

Collapse
claeusdev profile image
Nana Adjei Manu Ask Me Anything

We are able to tests components in isolation easily and as a potential user would actually use our application

Collapse
fredrikbergqvist profile image
Fredrik Bergqvist

I did the same, I am a happier person now ;)

Collapse
claeusdev profile image
Nana Adjei Manu Ask Me Anything

I’ve never been happier too