Repository navigation
Repair wp/5.9 branch Actions: Ignore the stale Browserslist data warning in unit tests - #84408
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
6a16c7b to
43cf97c
Compare
|
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
wp/5.9 branch Actions: Ignore Browserslist old-data warning in unit testswp/5.9 branch Actions: Ignore the stale Browserslist data warning in unit tests
43cf97c to
26bdc55
Compare
26bdc55 to
a61d96c
Compare
a61d96c to
c678e0a
Compare
Part of #82934.
What?
Sets
BROWSERSLIST_IGNORE_OLD_DATA=truebefore Jest boots, intest/unit/jest.config.js.Why?
Every
JavaScript(test-unit) job on this branch's real CI currently fails:@wordpress/jest-console's "must not warn" assertions turn the routine "Browserslist: caniuse-lite is outdated" warning — which several packages (e.g.packages/babel-preset-default) emit incidentally during a unit test run — into a hard test failure. This is purely a function of how much wall-clock time has passed since this branch's pinnedcaniuse-litedata was last current; it has nothing to do with any code change and will keep recurring indefinitely on a frozen branch that never re-pins the dependency.Mirrors
wp/7.0's fix for the identical problem, a468930 ("Tests: Ignore Browserslist old data warning in unit tests") — setting the env var before Jest starts suppresses the warning at the source rather than trying to assert around it. This branch'stest/unit/jest.config.jshas no existingprocess.env.TZline to insert alongside (unlikewp/7.0's copy), so the insertion lands directly after thetranspiledPackageNamesblock instead.Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.