ISSUE - Writing Tests for React Applications Using Jest and Enzyme

Enzyme doesn’t support React 18.

The lesson for testing react has us installing enzyme for our lesson when we should be using React Testing Library.


I just ran into this myself. I also found this article entitled, “Enzyme is dead”.

It appears that Enzyme does not support React v17 or v18. It stopped being maintained after v16. It appears we should be using the “React Testing Library” instead. This link states that it is a replacement for Enzyme and also works with Jest. (React Testing Library | Testing Library)

Hopefully the React course here on Codecademy gets updated to switch over.


Front-Eng Career Path still talks about Enzyme and uses an outdated Router. Due to this, we’re learning history instead of things being used now.

1 Like

Just posted this in another thread as follows:

If anyone else is just reaching this section and just discovered that Enzyme is no longer used and you get ERR! when trying to install locally, CC has a separate course on Learn React Testing with Jest and React Testing Library!

You basically skip through the rest of the lessons on the Front End/Full Stack course!