Open Bug 1749033 Opened 4 years ago Updated 3 years ago

propose some options for evolving our react testing strategy, since Enzyme is either dying or dead

Categories

(Firefox :: Messaging System, task, P2)

task

Tracking

()

People

(Reporter: dmosedale, Unassigned)

Details

Attachments

(1 obsolete file)

Enzyme, the AirBnB React testing library that we depend on, appears to be dying or dead: https://dev.to/wojtekmaj/enzyme-is-dead-now-what-ekl

It doesn't officially support React 17, although the author of the blog post above has created an adapter for it. And it doesn't sound like anyone's signed up to make support React 18. And the offical maintainer of enzyme sounds like he's not signed up for it either at least at the moment. Perhaps that will change, but it hasn't in quite a while...

Some options re what to about this are in the blog post above; including looking at https://testing-library.com/docs/react-testing-library/intro/. Which is kind-of a replacement for enzyme, but with some different philosophical choices.

Priority: -- → P2

Thanks for putting together this patch, Meg!

In the above WIP, you wrote:

Here's a quick example of how we could add react-testing-library alongside enzyme and begin converting existing tests.

New tests can be written with react-testing-library and we can begin converting existing Enzyme tests when we have bandwidth. Once the all of the Enzyme tests are switched over, we would be free to update React and react-testing-library to the latest versions.

This sounds like a fine strategy to me, and matches the one in the blog post I linked to in comment 0.

At https://docs.google.com/document/d/1b-8S_CVvnW-WseMzwGJgKNdCDyTRQaLtINlIot7XZJM/edit# I've put together a straw person React roadmap for browser/components/newtab, which includes a more detailed version of the plan, adapted from that blog post. I'd love comments on that as well as the whole proposed roadmap.

Attachment #9274272 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: