Opened 2 years ago
Last modified 6 months ago
#59644 new task (blessed)
Migrate JavaScript unit tests away from QUnit
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | needs-patch |
| Focuses: | Cc: |
Description
The QUnit tests really haven't evolved or expanded in recent years.
Alternatively, Gutenberg has a well developed test library based on Jest, and exports all of the config as a package we could use. In the interest of standardising, I suggest migrating our existing QUnit tests to work in Jest instead.
This will make it easier to contribute to these tests as well, plus it allows us to remove the last remaining usage of Puppeteer, as it turns out the QUnit tests run with that on CI. See https://core.trac.wordpress.org/ticket/59517#comment:13
They don't really need a headless browser though, Jest + jsdom should suffice.
Previously mentioned in #37117
Change History (1)
Note: See
TracTickets for help on using
tickets.
I think we should switch from QUnit to Playwright, that way we're using the same tool for e2e tests, visual regression tests, performance tests, and JavaScript unit tests. I'm seeing good initial results getting Claude Code to migrate the tests over. I'll carry on and see if I can get it into a good state.