Repository navigation
Repair wp/6.9 branch Actions: Ignore the stale Browserslist data warning in unit tests - #82870
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: 2.12 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. |
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed change is focused and has no unresolved blocking issues.
Pull request overview
Updates the wp/6.9 Jest configuration to suppress stale Browserslist data warnings during unit tests.
Changes:
- Sets
BROWSERSLIST_IGNORE_OLD_DATAbefore Jest initialization.
File summaries
| File | Description |
|---|---|
test/unit/jest.config.js |
Adds Browserslist warning suppression for unit tests. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bf1015e to
7a4ad30
Compare
7a4ad30 to
361d5e6
Compare
361d5e6 to
7d4adb2
Compare
7d4adb2 to
010e04f
Compare
b031816 to
72dedf1
Compare
72dedf1 to
d2a9c1a
Compare
d2a9c1a to
d81bca7
Compare
d81bca7 to
018476a
Compare
wp/6.9 branch Actions: Ignore stale Browserslist data warning in unit testswp/6.9 branch Actions: Ignore the stale Browserslist data warning in unit tests
018476a to
cf75491
Compare
ramonjd
left a comment
There was a problem hiding this comment.
Same two lines as a4689306258 on wp/7.0.
Test config only.
Every Browserslist version in this branch's lockfile honours BROWSERSLIST_IGNORE_OLD_DATA.
Tested locally with this branch's Browserslist and caniuse-lite versions.
Warns without the variable, silent with it.
The docgen suite that fails in CI fails without the change and passes with it.
cf75491 to
0061e3c
Compare
Part of #82785.
What?
This configures Jest to ignore the stale Browserslist data warning when running tests.
Why?
Browserslist's bundled
caniuse-litedatabase on this branch is old enough to print aconsole.warnthe first time it's consulted during a test run.@wordpress/jest-consoleautomatically fails any test where an unexpectedconsole.warnoccurs, so whichever suite happens to invoke Browserslist first fails — even though none of them are actually testing anything related to Browserslist or console output.How?
This is a cherry-pick of commit a468930, which was committed directly to the
wp/7.0branch and configuresBROWSERSLIST_IGNORE_OLD_DATAintest/unit/jest.config.jsThis was never merged forward to
wp/7.1ortrunkbecause those branches instead keepcaniuse-liteitself genuinely fresh via routine dependency-bump PRs (e.g. #79630), which isn't a viable long-term strategy for a frozen maintenance branch like this one.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.