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.

1 Like

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.

1 Like

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.