Repository navigation
Repair wp/6.2 branch Actions: Ignore the stale Browserslist data warning in unit tests - #84229
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.33 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. |
19d9a1e to
b46d915
Compare
b46d915 to
5dbd29f
Compare
|
Size Change: 0 B Total Size: 1.33 MB ℹ️ View Unchanged
|
wp/6.2 branch Actions: Ignore Browserslist old data warning in unit testswp/6.2 branch Actions: Ignore the stale Browserslist data warning in unit tests
Part of #82931.
What?
Sets
BROWSERSLIST_IGNORE_OLD_DATAintest/unit/jest.config.jsso it applies to every invocation of Jest on this branch, not only the CI jobs that already happen to set the same environment variable.Why?
Browserslist emits a console warning once its bundled
caniuse-litedata is more than a few months old. This branch's pinnedcaniuse-lite(1.0.30001434, November 2022) is well past that threshold, and when the warning fires during a test run it tripsjest-console's assertions that no unexpected console output occurred, failing tests that are otherwise passing.unit-test.yml'sunit-jsjob andend2end-test.ymlalready setBROWSERSLIST_IGNORE_OLD_DATA: trueas a job-level environment variable, so this warning is likely already suppressed for those specific CI jobs; this change makes the same suppression apply everywhere Jest runs (other tooling, local development) rather than only in the CI jobs that happen to already set it.How?
Based on a468930 ("Tests: Ignore Browserslist old data warning in unit tests") from a newer branch. This branch's
test/unit/jest.config.jsdoesn't have theTZenvironment variable line that commit anchors against, so the two-line change is placed directly abovemodule.exportsinstead.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.