feat: add jest-clean-console-reporter
Description
Reason for change: Test output was cluttered with thousands of repeated console warnings (e.g., 2,300+ identical "Background connection is not set" warnings), making it difficult to spot real issues and slowing down test debugging.
Improvement/solution: Added jest-clean-console-reporter to group and summarize console warnings/errors during test runs. This reduces test output noise by ~99.97% (from ~50,000+ lines to ~15 lines) while preserving all warning information in organized categories.
Changes:
- Installed
jest-clean-console-reporterpackage with Chalk v4 resolution for Node v24 compatibility - Created comprehensive rule files:
-
test/jest/console-reporter-rules-unit.js(38 rules covering ~83% of warnings) -
test/jest/console-reporter-rules-integration.js(27 rules covering ~100% of warnings)
-
- Updated Jest configurations (
jest.config.jsandjest.integration.config.js) to use the reporter - Created
test/jest/summary-reporter.jswrapper for SummaryReporter (required for Node v24 strict package exports) - Added documentation:
test/jest/CONSOLE-REPORTER.md
Top warnings now grouped:
- Background connection not initialized (2,300 occurrences)
- Reselect identity function warnings (1,163 occurrences)
- Invalid theme warnings (700+ occurrences)
- Reselect input stability warnings (533 occurrences)
- React act warnings (338+ occurrences)
Slack thread where this has been discussed
Changelog
CHANGELOG entry: null
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/5286
Manual testing steps
- Run unit tests:
yarn test:unit - Verify the test output shows a clean summary section at the end with grouped console messages
- Run integration tests:
yarn test:integration - Verify similar clean summary output appears for integration tests
- Compare with previous behavior by temporarily commenting out the reporter in
jest.config.jsto see the difference
Screenshots/Recordings
Before
Test output contained thousands of repeated warnings, making it impossible to identify real issues:
Warning: Background connection is not set...
Warning: Background connection is not set...
... (2,300+ identical lines)
Warning: An update to Component inside a test was not wrapped in act...
Warning: An update to Component inside a test was not wrapped in act...
... (hundreds more identical lines)
After
Test output now shows a clean, organized summary:
● Suppressed console messages:
ERROR 126 React: Act warnings (component updates not wrapped)
WARN 170 MetaMask: Background connection not initialized
WARN 85 Reselect: Identity function warnings
WARN 66 Reselect: Input stability warnings
WARN 56 MetaMask: Invalid theme warnings
Example for unit tests:
Example for integration tests:
Pre-merge author checklist
- [x] I've followed MetaMask Contributor Docs and MetaMask Extension Coding Standards.
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using JSDoc format if applicable
- [x] I've applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
Pre-merge reviewer checklist
- [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
[!NOTE] Integrates jest-clean-console-reporter into unit and integration Jest configs with custom rules, adding the package and Chalk resolution to reduce noisy console output.
- Testing/Infrastructure:
- Jest reporters: Replace default reporter with
jest-clean-console-reporterand addsummaryinjest.config.jsandjest.integration.config.js, wired to rule sets viarules: consoleReporterRules.- Rules: Add
test/jest/console-reporter-rules-unit.jsandtest/jest/console-reporter-rules-integration.jsdefining grouped suppression for common warnings/errors.- Dependencies:
- Add
jest-clean-console-reportertodevDependenciesand resolutionjest-clean-console-reporter/chalk@^4.1.2inpackage.json(lockfile updated).Written by Cursor Bugbot for commit 8b61b4ea8768ae670a37522b3286853de2e4fab2. This will update automatically on new commits. Configure here.
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
| Diff | Package | Supply Chain Security |
Vulnerability | Quality | Maintenance | License |
|---|---|---|---|---|---|---|
| jest-clean-console-reporter@0.3.0 |
Builds ready [0110727]
- builds: chrome, firefox
- builds (beta): chrome, firefox
- builds (flask): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- lavamoat build viz: Build System
- bundle size: Bundle Size Stats
- user-actions-benchmark: User Actions Stats
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
UI Startup Metrics (1222 ± 102 ms)
| Platform | BuildType | Page | Metric | Mean (ms) | Min (ms) | Max (ms) | Std Dev (ms) | P 75 (ms) | P 95 (ms) |
|---|---|---|---|---|---|---|---|---|---|
| Chrome | Browserify | Standard Home | uiStartup | 1222 | 1024 | 1508 | 102 | 1290 | 1423 |
| load | 1020 | 849 | 1251 | 87 | 1067 | 1185 | |||
| domContentLoaded | 1013 | 844 | 1240 | 86 | 1060 | 1181 | |||
| domInteractive | 25 | 14 | 112 | 20 | 21 | 81 | |||
| firstPaint | 518 | 85 | 1265 | 396 | 1002 | 1170 | |||
| backgroundConnect | 212 | 192 | 246 | 10 | 217 | 230 | |||
| firstReactRender | 31 | 19 | 81 | 11 | 33 | 52 | |||
| getState | 37 | 15 | 98 | 17 | 45 | 85 | |||
| initialActions | 1 | 0 | 5 | 1 | 1 | 3 | |||
| loadScripts | 807 | 653 | 1036 | 86 | 848 | 970 | |||
| setupStore | 12 | 6 | 40 | 6 | 12 | 20 | |||
| numNetworkReqs | 12 | 5 | 77 | 20 | 5 | 73 | |||
| Browserify | Power User Home | uiStartup | 2089 | 1667 | 2706 | 264 | 2241 | 2639 | |
| load | 1024 | 901 | 1518 | 131 | 1018 | 1375 | |||
| domContentLoaded | 1009 | 894 | 1514 | 131 | 1005 | 1367 | |||
| domInteractive | 35 | 18 | 165 | 28 | 33 | 118 | |||
| firstPaint | 543 | 106 | 1419 | 390 | 959 | 1307 | |||
| backgroundConnect | 260 | 201 | 712 | 111 | 230 | 551 | |||
| firstReactRender | 59 | 40 | 111 | 15 | 64 | 102 | |||
| getState | 190 | 144 | 733 | 89 | 185 | 221 | |||
| initialActions | 1 | 0 | 8 | 1 | 1 | 3 | |||
| loadScripts | 802 | 687 | 1311 | 131 | 794 | 1174 | |||
| setupStore | 20 | 12 | 50 | 7 | 23 | 38 | |||
| numNetworkReqs | 165 | 71 | 377 | 70 | 206 | 335 | |||
| Webpack | Standard Home | uiStartup | 819 | 697 | 1060 | 79 | 856 | 976 | |
| load | 634 | 565 | 843 | 71 | 650 | 805 | |||
| domContentLoaded | 629 | 561 | 835 | 70 | 647 | 799 | |||
| domInteractive | 26 | 15 | 138 | 23 | 22 | 92 | |||
| firstPaint | 242 | 75 | 843 | 195 | 195 | 776 | |||
| backgroundConnect | 11 | 5 | 79 | 11 | 12 | 27 | |||
| firstReactRender | 28 | 19 | 70 | 8 | 32 | 39 | |||
| getState | 27 | 13 | 73 | 12 | 37 | 48 | |||
| initialActions | 1 | 0 | 4 | 1 | 1 | 1 | |||
| loadScripts | 626 | 558 | 829 | 69 | 645 | 790 | |||
| setupStore | 11 | 6 | 49 | 6 | 13 | 19 | |||
| numNetworkReqs | 12 | 5 | 78 | 21 | 5 | 75 | |||
| Webpack | Power User Home | uiStartup | 1669 | 1295 | 2304 | 240 | 1899 | 2077 | |
| load | 677 | 576 | 1000 | 93 | 682 | 935 | |||
| domContentLoaded | 667 | 571 | 996 | 94 | 675 | 930 | |||
| domInteractive | 37 | 18 | 175 | 33 | 34 | 131 | |||
| firstPaint | 313 | 86 | 973 | 217 | 380 | 705 | |||
| backgroundConnect | 65 | 7 | 694 | 144 | 19 | 512 | |||
| firstReactRender | 61 | 43 | 92 | 10 | 68 | 80 | |||
| getState | 183 | 139 | 655 | 84 | 176 | 217 | |||
| initialActions | 1 | 0 | 4 | 1 | 1 | 2 | |||
| loadScripts | 664 | 569 | 988 | 92 | 672 | 921 | |||
| setupStore | 22 | 10 | 73 | 13 | 23 | 52 | |||
| numNetworkReqs | 168 | 71 | 413 | 76 | 212 | 343 | |||
| Firefox | Browserify | Standard Home | uiStartup | 1295 | 1076 | 1696 | 155 | 1417 | 1607 |
| load | 1063 | 932 | 1379 | 105 | 1134 | 1296 | |||
| domContentLoaded | 1062 | 932 | 1379 | 105 | 1133 | 1296 | |||
| domInteractive | 63 | 31 | 208 | 35 | 85 | 119 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 47 | 22 | 163 | 31 | 65 | 104 | |||
| firstReactRender | 22 | 18 | 43 | 5 | 23 | 34 | |||
| getState | 17 | 6 | 211 | 32 | 11 | 76 | |||
| initialActions | 1 | 0 | 3 | 0 | 1 | 2 | |||
| loadScripts | 1035 | 916 | 1363 | 93 | 1095 | 1242 | |||
| setupStore | 14 | 6 | 162 | 19 | 10 | 58 | |||
| numNetworkReqs | 12 | 5 | 68 | 17 | 6 | 63 | |||
| Browserify | Power User Home | uiStartup | 2472 | 1892 | 4258 | 430 | 2541 | 3569 | |
| load | 1105 | 922 | 1557 | 141 | 1096 | 1453 | |||
| domContentLoaded | 1105 | 922 | 1557 | 141 | 1095 | 1453 | |||
| domInteractive | 112 | 35 | 467 | 102 | 104 | 456 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 97 | 27 | 416 | 70 | 108 | 303 | |||
| firstReactRender | 58 | 37 | 133 | 17 | 64 | 85 | |||
| getState | 231 | 66 | 1273 | 200 | 227 | 734 | |||
| initialActions | 3 | 0 | 42 | 6 | 2 | 7 | |||
| loadScripts | 1071 | 907 | 1494 | 130 | 1069 | 1411 | |||
| setupStore | 169 | 9 | 884 | 202 | 224 | 670 | |||
| numNetworkReqs | 102 | 60 | 290 | 61 | 85 | 250 | |||
| Webpack | Standard Home | uiStartup | 1562 | 1278 | 2173 | 183 | 1633 | 1976 | |
| load | 1271 | 1091 | 1554 | 103 | 1317 | 1459 | |||
| domContentLoaded | 1271 | 1090 | 1554 | 103 | 1317 | 1458 | |||
| domInteractive | 62 | 26 | 160 | 33 | 88 | 121 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 51 | 21 | 191 | 32 | 51 | 118 | |||
| firstReactRender | 27 | 19 | 84 | 7 | 28 | 38 | |||
| getState | 20 | 6 | 223 | 33 | 14 | 78 | |||
| initialActions | 1 | 0 | 3 | 1 | 2 | 2 | |||
| loadScripts | 1243 | 1075 | 1527 | 96 | 1291 | 1408 | |||
| setupStore | 19 | 6 | 171 | 27 | 14 | 73 | |||
| numNetworkReqs | 12 | 5 | 67 | 16 | 7 | 62 | |||
| Webpack | Power User Home | uiStartup | 2956 | 2086 | 6072 | 734 | 3170 | 4596 | |
| load | 1436 | 1170 | 3007 | 364 | 1396 | 2313 | |||
| domContentLoaded | 1435 | 1170 | 3006 | 364 | 1395 | 2312 | |||
| domInteractive | 109 | 29 | 567 | 117 | 94 | 425 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 169 | 34 | 1115 | 225 | 149 | 965 | |||
| firstReactRender | 64 | 37 | 262 | 28 | 67 | 121 | |||
| getState | 302 | 73 | 1419 | 249 | 409 | 806 | |||
| initialActions | 2 | 0 | 4 | 1 | 2 | 3 | |||
| loadScripts | 1380 | 1132 | 2852 | 329 | 1350 | 2022 | |||
| setupStore | 154 | 5 | 1176 | 229 | 155 | 651 | |||
| numNetworkReqs | 103 | 61 | 257 | 61 | 80 | 250 |
📊 Page Load Benchmark Results
Current Commit: 0110727 | Date: 11/28/2025
📄 Localhost MetaMask Test Dapp
Samples: 100
Summary
- pageLoadTime-> current mean value: 1.03s (±54ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
- domContentLoaded-> current mean value: 708ms (±50ms) 🟢 | historical mean value: 721ms ⬇️ (historical data)
- firstContentfulPaint-> current mean value: 80ms (±12ms) 🟢 | historical mean value: 78ms ⬆️ (historical data)
📈 Detailed Results
| Metric | Mean | Std Dev | Min | Max | P95 | P99 |
|---|---|---|---|---|---|---|
| pageLoadTime | 1.03s | 54ms | 958ms | 1.28s | 1.08s | 1.28s |
| domContentLoaded | 708ms | 50ms | 662ms | 953ms | 753ms | 953ms |
| firstPaint | 80ms | 12ms | 68ms | 176ms | 92ms | 176ms |
| firstContentfulPaint | 80ms | 12ms | 68ms | 176ms | 92ms | 176ms |
| largestContentfulPaint | 0ms | 0ms | 0ms | 0ms | 0ms | 0ms |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 11.45 KiB (0.25%)
- ui: 295.15 KiB (3.96%)
- common: 59 KiB (0.67%)
Builds ready [f278f8f]
- builds: chrome, firefox
- builds (beta): chrome, firefox
- builds (flask): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- lavamoat build viz: Build System
- bundle size: Bundle Size Stats
- user-actions-benchmark: User Actions Stats
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
UI Startup Metrics (1221 ± 128 ms)
| Platform | BuildType | Page | Metric | Mean (ms) | Min (ms) | Max (ms) | Std Dev (ms) | P 75 (ms) | P 95 (ms) |
|---|---|---|---|---|---|---|---|---|---|
| Chrome | Browserify | Standard Home | uiStartup | 1221 | 1006 | 1685 | 128 | 1312 | 1416 |
| load | 1022 | 819 | 1416 | 109 | 1116 | 1173 | |||
| domContentLoaded | 1015 | 816 | 1410 | 108 | 1107 | 1168 | |||
| domInteractive | 25 | 15 | 98 | 21 | 20 | 89 | |||
| firstPaint | 647 | 94 | 1274 | 405 | 1044 | 1158 | |||
| backgroundConnect | 200 | 180 | 252 | 13 | 206 | 224 | |||
| firstReactRender | 30 | 18 | 60 | 10 | 35 | 49 | |||
| getState | 36 | 14 | 118 | 18 | 41 | 75 | |||
| initialActions | 1 | 0 | 5 | 1 | 1 | 3 | |||
| loadScripts | 823 | 633 | 1177 | 104 | 904 | 979 | |||
| setupStore | 12 | 7 | 27 | 5 | 14 | 25 | |||
| numNetworkReqs | 11 | 5 | 69 | 18 | 5 | 64 | |||
| Browserify | Power User Home | uiStartup | 1991 | 1567 | 2567 | 219 | 2136 | 2399 | |
| load | 1007 | 880 | 1475 | 121 | 1031 | 1316 | |||
| domContentLoaded | 996 | 869 | 1463 | 122 | 1024 | 1308 | |||
| domInteractive | 31 | 17 | 123 | 23 | 28 | 100 | |||
| firstPaint | 475 | 93 | 1499 | 364 | 926 | 1049 | |||
| backgroundConnect | 271 | 200 | 856 | 139 | 240 | 668 | |||
| firstReactRender | 51 | 39 | 90 | 8 | 55 | 62 | |||
| getState | 187 | 141 | 659 | 55 | 199 | 254 | |||
| initialActions | 1 | 0 | 3 | 1 | 1 | 2 | |||
| loadScripts | 787 | 671 | 1222 | 117 | 813 | 1095 | |||
| setupStore | 16 | 7 | 43 | 6 | 16 | 35 | |||
| numNetworkReqs | 79 | 64 | 160 | 22 | 75 | 145 | |||
| Webpack | Standard Home | uiStartup | 809 | 695 | 1051 | 79 | 840 | 981 | |
| load | 625 | 560 | 881 | 67 | 642 | 777 | |||
| domContentLoaded | 621 | 556 | 875 | 65 | 637 | 772 | |||
| domInteractive | 26 | 15 | 118 | 21 | 21 | 87 | |||
| firstPaint | 240 | 88 | 846 | 180 | 201 | 656 | |||
| backgroundConnect | 9 | 5 | 30 | 5 | 11 | 26 | |||
| firstReactRender | 28 | 19 | 238 | 22 | 31 | 35 | |||
| getState | 26 | 14 | 48 | 9 | 36 | 42 | |||
| initialActions | 1 | 0 | 3 | 1 | 1 | 2 | |||
| loadScripts | 618 | 554 | 865 | 64 | 634 | 763 | |||
| setupStore | 10 | 5 | 30 | 4 | 12 | 19 | |||
| numNetworkReqs | 10 | 5 | 65 | 16 | 5 | 58 | |||
| Webpack | Power User Home | uiStartup | 1677 | 1284 | 2463 | 270 | 1898 | 2202 | |
| load | 697 | 601 | 1116 | 110 | 693 | 966 | |||
| domContentLoaded | 688 | 595 | 1107 | 109 | 684 | 958 | |||
| domInteractive | 37 | 17 | 260 | 36 | 30 | 120 | |||
| firstPaint | 296 | 91 | 1114 | 232 | 263 | 931 | |||
| backgroundConnect | 126 | 8 | 676 | 213 | 94 | 572 | |||
| firstReactRender | 60 | 45 | 100 | 11 | 67 | 82 | |||
| getState | 179 | 139 | 254 | 20 | 190 | 215 | |||
| initialActions | 1 | 0 | 6 | 1 | 1 | 2 | |||
| loadScripts | 686 | 593 | 1105 | 108 | 683 | 950 | |||
| setupStore | 19 | 7 | 69 | 13 | 17 | 47 | |||
| numNetworkReqs | 79 | 62 | 251 | 29 | 74 | 151 | |||
| Firefox | Browserify | Standard Home | uiStartup | 1294 | 1072 | 1670 | 138 | 1384 | 1583 |
| load | 1082 | 926 | 1496 | 94 | 1143 | 1235 | |||
| domContentLoaded | 1081 | 926 | 1496 | 94 | 1142 | 1235 | |||
| domInteractive | 57 | 31 | 163 | 28 | 83 | 109 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 47 | 21 | 149 | 31 | 45 | 115 | |||
| firstReactRender | 22 | 18 | 37 | 4 | 22 | 33 | |||
| getState | 14 | 6 | 199 | 24 | 10 | 36 | |||
| initialActions | 1 | 0 | 2 | 1 | 1 | 2 | |||
| loadScripts | 1052 | 912 | 1472 | 86 | 1108 | 1198 | |||
| setupStore | 12 | 6 | 86 | 12 | 10 | 34 | |||
| numNetworkReqs | 12 | 5 | 64 | 16 | 7 | 62 | |||
| Browserify | Power User Home | uiStartup | 2995 | 2045 | 5322 | 894 | 3874 | 4572 | |
| load | 1382 | 936 | 2824 | 510 | 1377 | 2492 | |||
| domContentLoaded | 1381 | 936 | 2824 | 510 | 1377 | 2491 | |||
| domInteractive | 113 | 32 | 985 | 124 | 118 | 281 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 308 | 22 | 2059 | 415 | 394 | 1219 | |||
| firstReactRender | 61 | 36 | 151 | 24 | 74 | 124 | |||
| getState | 263 | 81 | 1070 | 225 | 272 | 794 | |||
| initialActions | 2 | 1 | 43 | 4 | 2 | 3 | |||
| loadScripts | 1209 | 922 | 2625 | 341 | 1224 | 2214 | |||
| setupStore | 141 | 5 | 1146 | 226 | 110 | 689 | |||
| numNetworkReqs | 77 | 51 | 138 | 21 | 77 | 127 | |||
| Webpack | Standard Home | uiStartup | 1526 | 1305 | 2058 | 164 | 1618 | 1900 | |
| load | 1248 | 1073 | 1535 | 95 | 1310 | 1439 | |||
| domContentLoaded | 1247 | 1073 | 1534 | 95 | 1310 | 1439 | |||
| domInteractive | 59 | 26 | 211 | 33 | 80 | 118 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 54 | 20 | 212 | 33 | 70 | 104 | |||
| firstReactRender | 29 | 20 | 145 | 16 | 29 | 40 | |||
| getState | 17 | 6 | 204 | 28 | 13 | 65 | |||
| initialActions | 1 | 0 | 3 | 1 | 2 | 2 | |||
| loadScripts | 1217 | 1058 | 1471 | 88 | 1284 | 1382 | |||
| setupStore | 15 | 5 | 111 | 16 | 12 | 49 | |||
| numNetworkReqs | 12 | 5 | 67 | 17 | 7 | 63 | |||
| Webpack | Power User Home | uiStartup | 3278 | 2107 | 5541 | 887 | 4276 | 4901 | |
| load | 1697 | 1175 | 2867 | 586 | 2351 | 2800 | |||
| domContentLoaded | 1697 | 1175 | 2866 | 586 | 2351 | 2800 | |||
| domInteractive | 165 | 32 | 1130 | 250 | 148 | 1005 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 252 | 20 | 1290 | 334 | 327 | 1194 | |||
| firstReactRender | 69 | 38 | 283 | 33 | 70 | 144 | |||
| getState | 353 | 82 | 2020 | 356 | 551 | 910 | |||
| initialActions | 2 | 1 | 31 | 3 | 2 | 7 | |||
| loadScripts | 1565 | 1154 | 2843 | 486 | 1578 | 2695 | |||
| setupStore | 109 | 4 | 775 | 168 | 93 | 571 | |||
| numNetworkReqs | 76 | 57 | 128 | 21 | 73 | 121 |
📊 Page Load Benchmark Results
Current Commit: f278f8f | Date: 12/4/2025
📄 Localhost MetaMask Test Dapp
Samples: 100
Summary
- pageLoadTime-> current mean value: 1.06s (±64ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
- domContentLoaded-> current mean value: 744ms (±62ms) 🟢 | historical mean value: 724ms ⬆️ (historical data)
- firstContentfulPaint-> current mean value: 79ms (±11ms) 🟢 | historical mean value: 78ms ⬆️ (historical data)
📈 Detailed Results
| Metric | Mean | Std Dev | Min | Max | P95 | P99 |
|---|---|---|---|---|---|---|
| pageLoadTime | 1.06s | 64ms | 1.02s | 1.36s | 1.27s | 1.36s |
| domContentLoaded | 744ms | 62ms | 709ms | 1.03s | 945ms | 1.03s |
| firstPaint | 79ms | 11ms | 60ms | 180ms | 88ms | 180ms |
| firstContentfulPaint | 79ms | 11ms | 60ms | 180ms | 88ms | 180ms |
| largestContentfulPaint | 0ms | 0ms | 0ms | 0ms | 0ms | 0ms |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 58 Bytes (0%)
- ui: 0 Bytes (0%)
- common: 132 Bytes (0%)
Builds ready [8461a1b]
- builds: chrome, firefox
- builds (beta): chrome, firefox
- builds (flask): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- lavamoat build viz: Build System
- bundle size: Bundle Size Stats
- user-actions-benchmark: User Actions Stats
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
UI Startup Metrics (1272 ± 93 ms)
| Platform | BuildType | Page | Metric | Mean (ms) | Min (ms) | Max (ms) | Std Dev (ms) | P 75 (ms) | P 95 (ms) |
|---|---|---|---|---|---|---|---|---|---|
| Chrome | Browserify | Standard Home | uiStartup | 1272 | 1046 | 1534 | 93 | 1328 | 1444 |
| load | 1043 | 874 | 1278 | 79 | 1088 | 1213 | |||
| domContentLoaded | 1037 | 869 | 1272 | 79 | 1082 | 1205 | |||
| domInteractive | 22 | 16 | 50 | 7 | 22 | 39 | |||
| firstPaint | 497 | 77 | 1264 | 396 | 1006 | 1100 | |||
| backgroundConnect | 220 | 196 | 279 | 14 | 229 | 245 | |||
| firstReactRender | 46 | 33 | 88 | 11 | 49 | 68 | |||
| getState | 36 | 17 | 120 | 17 | 40 | 73 | |||
| initialActions | 1 | 0 | 5 | 1 | 1 | 2 | |||
| loadScripts | 823 | 661 | 1058 | 76 | 865 | 974 | |||
| setupStore | 12 | 6 | 27 | 4 | 13 | 23 | |||
| numNetworkReqs | 8 | 6 | 30 | 6 | 6 | 30 | |||
| Browserify | Power User Home | uiStartup | 1952 | 1684 | 2726 | 187 | 2031 | 2321 | |
| load | 1097 | 915 | 1353 | 101 | 1171 | 1281 | |||
| domContentLoaded | 1087 | 908 | 1344 | 100 | 1160 | 1256 | |||
| domInteractive | 27 | 18 | 57 | 8 | 29 | 46 | |||
| firstPaint | 646 | 105 | 1360 | 446 | 1081 | 1262 | |||
| backgroundConnect | 265 | 207 | 732 | 104 | 249 | 553 | |||
| firstReactRender | 51 | 41 | 80 | 7 | 53 | 68 | |||
| getState | 207 | 150 | 762 | 65 | 228 | 274 | |||
| initialActions | 1 | 0 | 2 | 1 | 1 | 2 | |||
| loadScripts | 865 | 696 | 1126 | 99 | 944 | 1036 | |||
| setupStore | 17 | 10 | 39 | 7 | 17 | 33 | |||
| numNetworkReqs | 71 | 59 | 209 | 25 | 66 | 105 | |||
| Webpack | Standard Home | uiStartup | 831 | 713 | 986 | 52 | 854 | 930 | |
| load | 648 | 571 | 809 | 55 | 688 | 749 | |||
| domContentLoaded | 643 | 567 | 802 | 55 | 684 | 744 | |||
| domInteractive | 21 | 15 | 42 | 7 | 22 | 38 | |||
| firstPaint | 205 | 81 | 723 | 140 | 201 | 651 | |||
| backgroundConnect | 12 | 5 | 84 | 10 | 13 | 29 | |||
| firstReactRender | 55 | 33 | 239 | 35 | 54 | 137 | |||
| getState | 24 | 13 | 88 | 11 | 29 | 46 | |||
| initialActions | 1 | 0 | 2 | 1 | 1 | 1 | |||
| loadScripts | 640 | 565 | 799 | 55 | 682 | 742 | |||
| setupStore | 10 | 6 | 30 | 3 | 10 | 15 | |||
| numNetworkReqs | 8 | 6 | 30 | 6 | 6 | 24 | |||
| Webpack | Power User Home | uiStartup | 1450 | 1160 | 2005 | 170 | 1567 | 1766 | |
| load | 724 | 585 | 983 | 99 | 805 | 893 | |||
| domContentLoaded | 717 | 580 | 972 | 98 | 799 | 886 | |||
| domInteractive | 25 | 16 | 75 | 9 | 26 | 45 | |||
| firstPaint | 284 | 102 | 899 | 229 | 245 | 851 | |||
| backgroundConnect | 44 | 7 | 640 | 109 | 24 | 147 | |||
| firstReactRender | 48 | 40 | 80 | 5 | 50 | 57 | |||
| getState | 189 | 140 | 670 | 61 | 191 | 264 | |||
| initialActions | 1 | 0 | 3 | 1 | 1 | 1 | |||
| loadScripts | 714 | 578 | 969 | 98 | 796 | 884 | |||
| setupStore | 14 | 6 | 65 | 9 | 13 | 36 | |||
| numNetworkReqs | 66 | 57 | 107 | 10 | 66 | 95 | |||
| Firefox | Browserify | Standard Home | uiStartup | 1288 | 1096 | 1761 | 131 | 1369 | 1577 |
| load | 1048 | 926 | 1379 | 83 | 1096 | 1243 | |||
| domContentLoaded | 1047 | 926 | 1379 | 83 | 1096 | 1243 | |||
| domInteractive | 60 | 32 | 233 | 34 | 83 | 133 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 38 | 22 | 133 | 22 | 39 | 95 | |||
| firstReactRender | 38 | 28 | 62 | 8 | 39 | 56 | |||
| getState | 13 | 6 | 214 | 24 | 10 | 25 | |||
| initialActions | 1 | 0 | 3 | 1 | 2 | 2 | |||
| loadScripts | 1023 | 911 | 1351 | 77 | 1054 | 1179 | |||
| setupStore | 11 | 5 | 75 | 10 | 10 | 24 | |||
| numNetworkReqs | 8 | 6 | 26 | 5 | 7 | 24 | |||
| Browserify | Power User Home | uiStartup | 2631 | 1595 | 4037 | 588 | 3114 | 3401 | |
| load | 1608 | 959 | 2568 | 562 | 2168 | 2358 | |||
| domContentLoaded | 1608 | 959 | 2568 | 563 | 2168 | 2358 | |||
| domInteractive | 162 | 32 | 1398 | 307 | 86 | 1050 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 167 | 23 | 1224 | 238 | 182 | 1040 | |||
| firstReactRender | 55 | 38 | 103 | 12 | 57 | 85 | |||
| getState | 143 | 79 | 325 | 45 | 170 | 229 | |||
| initialActions | 2 | 0 | 8 | 1 | 2 | 3 | |||
| loadScripts | 1529 | 943 | 2550 | 535 | 2095 | 2311 | |||
| setupStore | 38 | 5 | 295 | 60 | 33 | 216 | |||
| numNetworkReqs | 70 | 38 | 133 | 16 | 68 | 120 | |||
| Webpack | Standard Home | uiStartup | 1547 | 1315 | 1884 | 111 | 1604 | 1797 | |
| load | 1266 | 1091 | 1538 | 79 | 1309 | 1455 | |||
| domContentLoaded | 1266 | 1090 | 1538 | 80 | 1309 | 1454 | |||
| domInteractive | 60 | 27 | 234 | 37 | 80 | 137 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 46 | 21 | 116 | 23 | 50 | 106 | |||
| firstReactRender | 44 | 34 | 99 | 12 | 45 | 66 | |||
| getState | 14 | 7 | 167 | 17 | 14 | 22 | |||
| initialActions | 1 | 0 | 3 | 1 | 2 | 2 | |||
| loadScripts | 1241 | 1076 | 1464 | 76 | 1281 | 1429 | |||
| setupStore | 12 | 5 | 60 | 6 | 12 | 22 | |||
| numNetworkReqs | 8 | 6 | 27 | 5 | 7 | 24 | |||
| Webpack | Power User Home | uiStartup | 2756 | 1717 | 4812 | 619 | 3243 | 3616 | |
| load | 1766 | 1106 | 3051 | 539 | 2331 | 2663 | |||
| domContentLoaded | 1765 | 1106 | 3050 | 539 | 2331 | 2663 | |||
| domInteractive | 219 | 28 | 1531 | 368 | 100 | 1034 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 123 | 25 | 1059 | 173 | 147 | 287 | |||
| firstReactRender | 57 | 34 | 127 | 16 | 60 | 97 | |||
| getState | 142 | 70 | 1048 | 100 | 160 | 230 | |||
| initialActions | 2 | 1 | 7 | 1 | 2 | 6 | |||
| loadScripts | 1719 | 1081 | 3026 | 521 | 2260 | 2559 | |||
| setupStore | 47 | 3 | 1179 | 162 | 24 | 149 | |||
| numNetworkReqs | 70 | 58 | 124 | 13 | 73 | 96 |
📊 Page Load Benchmark Results
Current Commit: 8461a1b | Date: 12/9/2025
📄 Localhost MetaMask Test Dapp
Samples: 100
Summary
- pageLoadTime-> current mean value: 1.06s (±63ms) 🟡 | historical mean value: 1.06s ⬆️ (historical data)
- domContentLoaded-> current mean value: 744ms (±60ms) 🟢 | historical mean value: 738ms ⬆️ (historical data)
- firstContentfulPaint-> current mean value: 78ms (±10ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)
📈 Detailed Results
| Metric | Mean | Std Dev | Min | Max | P95 | P99 |
|---|---|---|---|---|---|---|
| pageLoadTime | 1.06s | 63ms | 1.02s | 1.33s | 1.28s | 1.33s |
| domContentLoaded | 744ms | 60ms | 707ms | 998ms | 947ms | 998ms |
| firstPaint | 78ms | 10ms | 60ms | 160ms | 88ms | 160ms |
| firstContentfulPaint | 78ms | 10ms | 60ms | 160ms | 88ms | 160ms |
| largestContentfulPaint | 0ms | 0ms | 0ms | 0ms | 0ms | 0ms |
Bundle size diffs [🚀 Bundle size reduced!]
- background: 71.36 KiB (1.37%)
- ui: 1.63 KiB (0.02%)
- common: -71.75 KiB (-0.8%)
Here's a detailed README we ended up not including in the PR (removed in this commit: https://github.com/MetaMask/metamask-extension/pull/38208/commits/8b61b4ea8768ae670a37522b3286853de2e4fab2). I post it here as a comment, just in case we're looking for more detail about this PR some day:
Console Reporter for Jest Tests
We use jest-clean-console-reporter to group and summarize console warnings/errors during test runs, making it easier to spot real issues.
What It Does
Instead of seeing thousands of repeated warnings like:
Warning: Background connection is not set...
Warning: Background connection is not set...
Warning: Background connection is not set...
... (2,300 more times)
You'll see a clean summary:
● Suppressed console messages:
WARN 170 MetaMask: Background connection not initialized
WARN 85 Reselect: Identity function warnings
WARN 66 Reselect: Input stability warnings
Result: 99.97% reduction in test output noise.
Usage
The reporter runs automatically with unit and integration test commands:
yarn test:unit
yarn test:integration
No additional configuration needed!
How It Works
Rules are defined in separate files:
-
Unit tests:
test/jest/console-reporter-rules-unit.js -
Integration tests:
test/jest/console-reporter-rules-integration.js
Each rule matches console messages and groups them by category. Rules are matched in order, so more specific patterns should come first.
Adding or Modifying Rules
Rule Structure
{
match: /regex pattern/u, // RegExp, string, or function
group: 'Group Label', // String to group by, or null to ignore
keep: true, // (Optional) Keep in output AND summary
}
Examples
Group similar warnings:
{
match: /Warning: componentWillMount has been renamed/u,
group: 'React: componentWill* lifecycle deprecations',
}
Suppress a warning completely:
{
match: /Some noisy warning we can't fix/u,
group: null, // null = suppress completely
}
Match by log level:
{
match: (_message, level) => level === 'log',
group: null, // Ignore all console.log
}
Steps to Add a Rule
- Identify the warning pattern (run tests and note the exact message)
- Open the appropriate rules file:
- Unit tests:
test/jest/console-reporter-rules-unit.js - Integration tests:
test/jest/console-reporter-rules-integration.js
- Unit tests:
- Add your rule to the appropriate category section
- Run tests to verify it works:
yarn test:unitoryarn test:integration
Important: Always use the u flag with regex patterns for proper Unicode handling (required by ESLint).
Common Warning Categories
The rules cover these main categories:
- MetaMask-specific: Background connection, theme validation, migrations
- Reselect: Redux selector performance warnings (identity functions, input stability)
- React: Act warnings, lifecycle deprecations, DOM nesting, PropTypes
- Third-party: Library compatibility warnings
- Test errors: Uncaught errors, fetch failures
Troubleshooting
Reporter not working?
- Ensure
jest-clean-console-reporteris installed:yarn install - Check that rules files exist and are properly formatted
- Verify Jest config includes the reporter (already configured)
Warnings not being grouped?
- Check your regex patterns (use the
uflag!) - Test patterns in isolation
- Try using a predicate function for complex matching
- Rules are matched in order - put more specific patterns first
Want to see raw output for debugging?
- Add
keep: trueto specific rules - Or temporarily comment out the reporter in
jest.config.js
Initial Coverage
- Unit tests: ~83% of warnings grouped (5,234 of 6,299 messages)
- Integration tests: ~100% of warnings grouped (435 of 435 messages)
Top warnings being grouped:
- Background connection not initialized (2,300 occurrences)
- Reselect identity function warnings (1,163 occurrences)
- Invalid theme warnings (700+ occurrences)
- Reselect input stability warnings (533 occurrences)
- React act warnings (338+ occurrences)
Limitations
This reporter does NOT:
- Create persistent snapshots
- Fail CI on new warnings
- Prevent regression
It only improves the display of console output during test runs. For regression prevention, a custom snapshot-based reporter would be needed.
References
Builds ready [8b61b4e]
- builds: chrome, firefox
- builds (beta): chrome, firefox
- builds (flask): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- bundle size: Bundle Size Stats
- user-actions-benchmark: User Actions Stats
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
UI Startup Metrics (1284 ± 114 ms)
| Platform | BuildType | Page | Metric | Mean (ms) | Min (ms) | Max (ms) | Std Dev (ms) | P 75 (ms) | P 95 (ms) |
|---|---|---|---|---|---|---|---|---|---|
| Chrome | Browserify | Standard Home | uiStartup | 1284 | 1014 | 1596 | 114 | 1369 | 1469 |
| load | 1056 | 870 | 1376 | 97 | 1118 | 1239 | |||
| domContentLoaded | 1050 | 857 | 1369 | 96 | 1111 | 1222 | |||
| domInteractive | 26 | 15 | 96 | 19 | 22 | 86 | |||
| firstPaint | 475 | 86 | 1215 | 388 | 1002 | 1170 | |||
| backgroundConnect | 215 | 191 | 258 | 11 | 220 | 237 | |||
| firstReactRender | 47 | 31 | 103 | 14 | 56 | 78 | |||
| getState | 40 | 17 | 142 | 21 | 47 | 104 | |||
| initialActions | 1 | 0 | 7 | 1 | 1 | 2 | |||
| loadScripts | 841 | 662 | 1147 | 93 | 901 | 1007 | |||
| setupStore | 12 | 5 | 29 | 5 | 13 | 23 | |||
| numNetworkReqs | 13 | 6 | 78 | 20 | 6 | 72 | |||
| Browserify | Power User Home | uiStartup | 1952 | 1546 | 2428 | 171 | 2047 | 2296 | |
| load | 1095 | 888 | 1435 | 120 | 1176 | 1320 | |||
| domContentLoaded | 1085 | 882 | 1416 | 119 | 1162 | 1314 | |||
| domInteractive | 32 | 17 | 121 | 23 | 30 | 103 | |||
| firstPaint | 553 | 94 | 1430 | 421 | 1052 | 1261 | |||
| backgroundConnect | 250 | 197 | 857 | 93 | 240 | 559 | |||
| firstReactRender | 51 | 39 | 86 | 8 | 53 | 70 | |||
| getState | 226 | 139 | 739 | 127 | 220 | 696 | |||
| initialActions | 1 | 0 | 2 | 1 | 1 | 2 | |||
| loadScripts | 868 | 689 | 1201 | 117 | 947 | 1096 | |||
| setupStore | 16 | 7 | 53 | 7 | 15 | 37 | |||
| numNetworkReqs | 72 | 58 | 149 | 21 | 69 | 135 | |||
| Webpack | Standard Home | uiStartup | 824 | 683 | 1116 | 80 | 876 | 974 | |
| load | 664 | 577 | 935 | 75 | 713 | 808 | |||
| domContentLoaded | 659 | 572 | 926 | 74 | 708 | 802 | |||
| domInteractive | 26 | 14 | 119 | 20 | 22 | 85 | |||
| firstPaint | 234 | 84 | 810 | 176 | 220 | 707 | |||
| backgroundConnect | 11 | 6 | 62 | 7 | 10 | 29 | |||
| firstReactRender | 54 | 31 | 209 | 34 | 53 | 133 | |||
| getState | 29 | 15 | 82 | 12 | 38 | 50 | |||
| initialActions | 1 | 0 | 3 | 1 | 1 | 2 | |||
| loadScripts | 656 | 569 | 916 | 73 | 705 | 799 | |||
| setupStore | 11 | 6 | 30 | 5 | 12 | 20 | |||
| numNetworkReqs | 13 | 6 | 79 | 19 | 7 | 74 | |||
| Webpack | Power User Home | uiStartup | 1407 | 1074 | 2072 | 206 | 1566 | 1759 | |
| load | 723 | 588 | 1077 | 101 | 812 | 916 | |||
| domContentLoaded | 715 | 583 | 1071 | 101 | 802 | 910 | |||
| domInteractive | 32 | 15 | 167 | 27 | 27 | 100 | |||
| firstPaint | 359 | 119 | 880 | 247 | 664 | 843 | |||
| backgroundConnect | 70 | 7 | 653 | 145 | 33 | 533 | |||
| firstReactRender | 50 | 40 | 81 | 6 | 51 | 65 | |||
| getState | 194 | 145 | 319 | 38 | 214 | 281 | |||
| initialActions | 1 | 0 | 3 | 1 | 1 | 2 | |||
| loadScripts | 712 | 581 | 1056 | 100 | 800 | 907 | |||
| setupStore | 14 | 6 | 44 | 8 | 14 | 36 | |||
| numNetworkReqs | 72 | 57 | 214 | 26 | 67 | 138 | |||
| Firefox | Browserify | Standard Home | uiStartup | 1449 | 1138 | 2490 | 215 | 1541 | 1816 |
| load | 1137 | 957 | 1375 | 99 | 1208 | 1327 | |||
| domContentLoaded | 1136 | 956 | 1374 | 99 | 1207 | 1327 | |||
| domInteractive | 73 | 31 | 214 | 37 | 95 | 134 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 66 | 23 | 292 | 55 | 78 | 194 | |||
| firstReactRender | 42 | 32 | 82 | 9 | 44 | 61 | |||
| getState | 23 | 7 | 1083 | 107 | 12 | 24 | |||
| initialActions | 1 | 0 | 3 | 1 | 2 | 2 | |||
| loadScripts | 1100 | 939 | 1303 | 86 | 1163 | 1248 | |||
| setupStore | 15 | 6 | 122 | 17 | 12 | 52 | |||
| numNetworkReqs | 15 | 6 | 94 | 21 | 8 | 73 | |||
| Browserify | Power User Home | uiStartup | 2618 | 1591 | 3726 | 518 | 3039 | 3349 | |
| load | 1635 | 937 | 2556 | 493 | 2029 | 2386 | |||
| domContentLoaded | 1635 | 931 | 2555 | 493 | 2029 | 2386 | |||
| domInteractive | 135 | 30 | 1055 | 231 | 86 | 909 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 224 | 25 | 1114 | 248 | 236 | 948 | |||
| firstReactRender | 55 | 36 | 112 | 13 | 59 | 87 | |||
| getState | 131 | 80 | 242 | 41 | 159 | 218 | |||
| initialActions | 2 | 0 | 8 | 1 | 2 | 4 | |||
| loadScripts | 1521 | 923 | 2344 | 458 | 1953 | 2240 | |||
| setupStore | 39 | 4 | 398 | 65 | 42 | 229 | |||
| numNetworkReqs | 75 | 56 | 135 | 23 | 70 | 128 | |||
| Webpack | Standard Home | uiStartup | 1604 | 1343 | 2284 | 183 | 1725 | 1966 | |
| load | 1314 | 1106 | 1616 | 115 | 1373 | 1557 | |||
| domContentLoaded | 1314 | 1106 | 1615 | 115 | 1372 | 1556 | |||
| domInteractive | 84 | 31 | 236 | 46 | 121 | 166 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 55 | 23 | 217 | 39 | 62 | 152 | |||
| firstReactRender | 44 | 33 | 88 | 8 | 48 | 57 | |||
| getState | 19 | 7 | 153 | 25 | 16 | 58 | |||
| initialActions | 1 | 0 | 3 | 1 | 2 | 2 | |||
| loadScripts | 1286 | 1091 | 1587 | 107 | 1345 | 1503 | |||
| setupStore | 21 | 7 | 243 | 32 | 16 | 85 | |||
| numNetworkReqs | 15 | 6 | 86 | 21 | 8 | 78 | |||
| Webpack | Power User Home | uiStartup | 2735 | 1637 | 3666 | 537 | 3182 | 3500 | |
| load | 1871 | 1131 | 2716 | 513 | 2380 | 2575 | |||
| domContentLoaded | 1870 | 1124 | 2716 | 513 | 2380 | 2574 | |||
| domInteractive | 242 | 29 | 1000 | 340 | 243 | 973 | |||
| firstPaint | - | - | - | - | - | - | |||
| backgroundConnect | 150 | 26 | 1152 | 192 | 187 | 393 | |||
| firstReactRender | 59 | 38 | 131 | 17 | 64 | 97 | |||
| getState | 129 | 78 | 234 | 44 | 161 | 226 | |||
| initialActions | 3 | 1 | 46 | 6 | 2 | 8 | |||
| loadScripts | 1807 | 1115 | 2571 | 486 | 2288 | 2487 | |||
| setupStore | 31 | 5 | 375 | 48 | 39 | 100 | |||
| numNetworkReqs | 73 | 50 | 128 | 21 | 69 | 121 |
📊 Page Load Benchmark Results
Current Commit: 8b61b4e | Date: 12/10/2025
📄 Localhost MetaMask Test Dapp
Samples: 100
Summary
- pageLoadTime-> current mean value: 1.05s (±54ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
- domContentLoaded-> current mean value: 730ms (±50ms) 🟢 | historical mean value: 718ms ⬆️ (historical data)
- firstContentfulPaint-> current mean value: 78ms (±11ms) 🟢 | historical mean value: 78ms ⬆️ (historical data)
📈 Detailed Results
| Metric | Mean | Std Dev | Min | Max | P95 | P99 |
|---|---|---|---|---|---|---|
| pageLoadTime | 1.05s | 54ms | 1.01s | 1.37s | 1.08s | 1.37s |
| domContentLoaded | 730ms | 50ms | 702ms | 1.02s | 764ms | 1.02s |
| firstPaint | 78ms | 11ms | 60ms | 168ms | 92ms | 168ms |
| firstContentfulPaint | 78ms | 11ms | 60ms | 168ms | 92ms | 168ms |
| largestContentfulPaint | 0ms | 0ms | 0ms | 0ms | 0ms | 0ms |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 72.89 KiB (1.4%)
- ui: -19.24 KiB (-0.25%)
- common: -63.86 KiB (-0.71%)
LGTM !