Repository navigation
Repair wp/5.8 branch Actions: Ignore the stale Browserslist data warning in unit tests - #84443
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 |
c577dea to
aa76afc
Compare
|
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.8 branch Actions: Ignore Browserslist old-data warning in unit testswp/5.8 branch Actions: Ignore the stale Browserslist data warning in unit tests
aa76afc to
fc0aa5e
Compare
fc0aa5e to
88383b4
Compare
88383b4 to
8e1d93d
Compare
Part of #82935.
What?
Sets
BROWSERSLIST_IGNORE_OLD_DATA=trueintest/unit/jest.config.js, before Jest starts.Why?
The
JavaScriptunit test job fails with 5 failed tests, all for the same reason:The warning is Browserslist's
caniuse-lite is outdated. This branch lockscaniuse-lite@1.0.30001228(May 2021), and Browserslist compares the data's age against today's date, so the warning fires on every run and will keep firing.@wordpress/jest-preset-defaultfails any test that logs an unexpected warning, so every test that loadsbrowserslistfails:packages/babel-plugin-import-jsx-pragma/test/index.jspackages/babel-plugin-makepot/test/index.jspackages/warning/test/babel-plugin.jspackages/babel-preset-default/test/index.jspackages/browserslist-config/test/index.test.jsNo code change causes this; it is only the passage of time.
How?
Same fix as
wp/7.0's a468930 ("Tests: Ignore Browserslist old data warning in unit tests"), which turns the warning off at the source.wp/7.0's copy of the file has aprocess.env.TZline to put it next to; this branch's doesn't, so the line goes after thetranspiledPackageNamesblock.wp/5.9(#84408) andwp/6.0(#84275) place it the same way.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.
🤖 Generated with Claude Code