Skip to content

Conversation

@gauthierpetetin
Copy link
Contributor

@gauthierpetetin gauthierpetetin commented Dec 4, 2025

Description

Reason for change:
Building on PR #38208 which added jest-clean-console-reporter to group and summarize console warnings, this PR adds a baseline enforcement system to prevent new console warnings/errors from being introduced into the codebase.

Problem:
While jest-clean-console-reporter organizes the output, it doesn't prevent regressions. Developers can still introduce new warnings without realizing it, leading to gradual console pollution over time.

Solution:
Added a custom Jest reporter that tracks console warnings per test file and fails tests when warnings increase above the baseline. This creates a "ratchet" effect where the codebase can only get cleaner over time.

Changes:

  • Created test/jest/console-baseline-reporter.js - Unified reporter for capture and enforcement modes
  • Created test/jest/console-categorizer.js - Shared categorization logic using same rules as jest-clean-console-reporter
  • Created baseline files:
    • test/jest/console-baseline-unit.json (495 files tracked)
    • test/jest/console-baseline-integration.json (21 files tracked)
  • Added new yarn scripts:
    • yarn test:unit:update-baseline - Update unit test baseline
    • yarn test:integration:update-baseline - Update integration test baseline
  • Updated Jest configurations to include the baseline reporter
  • Added documentation:
    • test/jest/CONSOLE-BASELINE.md - Quick reference guide
    • test/jest/CONSOLE-BASELINE-TEST.md - Manual testing steps

Key features:

  • Per-file tracking: Know exactly which file caused a warning increase
  • Single-file enforcement: Run one test file and verify it against its baseline
  • Merge-based updates: Single-file updates preserve other files in baseline
  • Improvement detection: Shows when warnings are reduced (encourages cleanup)
  • Zero tolerance: Any increase in warnings fails the test

Changelog

CHANGELOG entry: null

Related issues

Relates to: https://github.com/MetaMask/MetaMask-planning/issues/5286

Manual testing steps

See CONSOLE-BASELINE-TEST.md for detailed testing instructions.

Tests in the CI

In PR #38565, we've added a new warning in a unit test and a new warning in an integration test to prove that CI fails in such cases.

Screenshots/Recordings

Baseline Enforcement - Pass

PASS app/scripts/controllers/permissions/background-api.test.js

Test Suites: 1 passed, 1 total
Tests:       45 passed, 45 total

✅ Console baseline matches exactly!

Baseline Enforcement - Violation Detected

PASS app/scripts/controllers/permissions/background-api.test.js

Test Suites: 1 passed, 1 total
Tests:       45 passed, 45 total

═══════════════════════════════════════════════════════════════════════════════
  Console Baseline Report (Per-File)
═══════════════════════════════════════════════════════════════════════════════

❌ BASELINE VIOLATIONS DETECTED

  📁 app/scripts/controllers/permissions/background-api.test.js
     🆕 NEW: warn: REVIEWER_TEST: This should trigger
        Current: 45 occurrences

  💡 Next steps:
     1. Fix the warnings in your code, OR
     2. Update baseline: yarn test:unit:update-baseline (requires justification)

═══════════════════════════════════════════════════════════════════════════════

Baseline Update

PASS app/scripts/controllers/permissions/background-api.test.js

✅ Baseline updated: 1 file(s) updated, 495 total in baseline
   Written to: /path/to/test/jest/console-baseline-unit.json

Pre-merge author checklist

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

Adds a custom Jest reporter and baselines to enforce no new console warnings/errors, with scripts, config updates, and docs.

  • Testing infrastructure:
    • Add test/jest/console-baseline-reporter.js to capture/enforce per-file console baselines (unit/integration).
    • Add shared categorizer test/jest/console-categorizer.js using existing console reporter rules.
    • Introduce baseline files: test/jest/console-baseline-unit.json and test/jest/console-baseline-integration.json.
  • Jest config:
    • Register baseline reporter first in jest.config.js and jest.integration.config.js.
    • Set verbose: false to buffer console output for reporters.
  • Scripts (package.json):
    • Add test:unit:update-baseline and test:integration:update-baseline (use UPDATE_BASELINE=true).
  • CI (.github/workflows/run-tests.yml):
    • Run yarn test:integration:coverage without --silent and upload coverage artifact.
  • Docs:
    • Add test/jest/CONSOLE-BASELINE.md and test/jest/CONSOLE-BASELINE-TEST.md with usage and manual testing steps.

Written by Cursor Bugbot for commit 09986f3. This will update automatically on new commits. Configure here.

@gauthierpetetin gauthierpetetin self-assigned this Dec 4, 2025
@gauthierpetetin gauthierpetetin added the team-extension-platform Extension Platform team label Dec 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

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.

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Dec 4, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [af13477]
📊 Page Load Benchmark Results

Current Commit: af13477 | Date: 12/4/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±71ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 732ms (±69ms) 🟢 | historical mean value: 722ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±10ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 71ms 1.00s 1.32s 1.27s 1.32s
domContentLoaded 732ms 69ms 696ms 1.00s 955ms 1.00s
firstPaint 76ms 10ms 60ms 156ms 84ms 156ms
firstContentfulPaint 76ms 10ms 60ms 156ms 84ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@metamaskbot
Copy link
Collaborator

Builds ready [e27f47e]
UI Startup Metrics (1446 ± 143 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14461100182814315541666
load1203931154612612881408
domContentLoaded1194928153512512801393
domInteractive31162042826101
firstPaint78592155448512251396
backgroundConnect27719534232300322
firstReactRender372284124359
getState4515188255680
initialActions105124
loadScripts927706124511610071125
setupStore1664781835
numNetworkReqs1157117562
BrowserifyPower User HomeuiStartup20101645258221621782410
load1017876172913910341308
domContentLoaded1005869172113910261298
domInteractive3217227282887
firstPaint53610513983959441256
backgroundConnect258200785115230536
firstReactRender53418085671
getState19614573178208265
initialActions104112
loadScripts79766615011378151096
setupStore1674371636
numNetworkReqs79641552274145
WebpackStandard HomeuiStartup829719112172861998
load63956585858671764
domContentLoaded63556185058667757
domInteractive2616110202288
firstPaint19986857123204598
backgroundConnect1158091126
firstReactRender28218683238
getState281365123552
initialActions104112
loadScripts63255984156665748
setupStore1153951218
numNetworkReqs1056114556
WebpackPower User HomeuiStartup16541251238129319142247
load682590100391704891
domContentLoaded67458299891692884
domInteractive34161592830119
firstPaint25290706156269672
backgroundConnect121771221493621
firstReactRender6047110116579
getState18014829222190217
initialActions102012
loadScripts67158199090690875
setupStore1694991540
numNetworkReqs79532582874147
FirefoxBrowserifyStandard HomeuiStartup14291166209716815361762
load11671002147410412311351
domContentLoaded11661002147310412301344
domInteractive73332343991147
firstPaint------
backgroundConnect58244595674154
firstReactRender25205152636
getState157243251235
initialActions103122
loadScripts113698614499611981313
setupStore13661101237
numNetworkReqs1256617664
BrowserifyPower User HomeuiStartup29611823500381237834400
load13461010258042913662407
domContentLoaded13461009258042913652407
domInteractive983643164106224
firstPaint------
backgroundConnect2282912532862911003
firstReactRender5836111176199
getState30577966258427870
initialActions407810219
loadScripts1247982250134612892226
setupStore13091210206117614
numNetworkReqs77511452271129
WebpackStandard HomeuiStartup15551278227417316621830
load12671093158810013411424
domContentLoaded12661092158810013411423
domInteractive64281623286120
firstPaint------
backgroundConnect55193194655167
firstReactRender28196663039
getState187200301450
initialActions103122
loadScripts1236107014948813021377
setupStore167106191472
numNetworkReqs1257016764
WebpackPower User HomeuiStartup32732259643091141984787
load16321090322155820472719
domContentLoaded16311089322155820472719
domInteractive1662911652511411055
firstPaint------
backgroundConnect2012412992901901079
firstReactRender64392573164124
getState332841208282533879
initialActions2039523
loadScripts15301073303847715692582
setupStore12561170208108572
numNetworkReqs78591342272126
📊 Page Load Benchmark Results

Current Commit: e27f47e | Date: 12/4/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±65ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 739ms (±63ms) 🟢 | historical mean value: 724ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±13ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 65ms 1.02s 1.35s 1.27s 1.35s
domContentLoaded 739ms 63ms 707ms 1.02s 942ms 1.02s
firstPaint 78ms 13ms 64ms 196ms 88ms 196ms
firstContentfulPaint 78ms 13ms 64ms 196ms 88ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@metamaskbot
Copy link
Collaborator

Builds ready [805f210]
UI Startup Metrics (1273 ± 111 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12731027160111113511464
load106486813839811111261
domContentLoaded105886613769711041256
domInteractive2715108212396
firstPaint48181134240310251188
backgroundConnect22120127912228241
firstReactRender31205683549
getState3616111164660
initialActions107113
loadScripts8436611152948861031
setupStore1373051424
numNetworkReqs1157017560
BrowserifyPower User HomeuiStartup20161659282723021702451
load1024901137811810741291
domContentLoaded1012892137111810621280
domInteractive3017101192985
firstPaint5529913164019631280
backgroundConnect267198826136234752
firstReactRender5341101105664
getState19314467458208259
initialActions105112
loadScripts80268511681168431076
setupStore1685181640
numNetworkReqs78621572075138
WebpackStandard HomeuiStartup796686102868821945
load61955581862640772
domContentLoaded61555081362634768
domInteractive2515106192181
firstPaint20583779131193598
backgroundConnect1055061025
firstReactRender27204053136
getState261382113543
initialActions104112
loadScripts61254780460632759
setupStore1062131217
numNetworkReqs1056915559
WebpackPower User HomeuiStartup16011237226325618612130
load673586108098695893
domContentLoaded665581107298690885
domInteractive37182363631115
firstPaint265121921179275679
backgroundConnect122762220996566
firstReactRender5844104106481
getState18613967473186251
initialActions102011
loadScripts663579106196688875
setupStore171067101544
numNetworkReqs79642572973150
FirefoxBrowserifyStandard HomeuiStartup13841144183314614741674
load113798215109712041321
domContentLoaded113798115109712041321
domInteractive70321943588141
firstPaint------
backgroundConnect59222624175146
firstReactRender24185252534
getState1164961228
initialActions102112
loadScripts110196814328911631264
setupStore146152201136
numNetworkReqs1256416660
BrowserifyPower User HomeuiStartup31092041512787339634680
load1412956295949913852514
domContentLoaded1412956295949813842508
domInteractive1043237273115272
firstPaint------
backgroundConnect3002712133664021170
firstReactRender65352753264126
getState310881256272366911
initialActions2032323
loadScripts1244942278934613032143
setupStore15861221254117821
numNetworkReqs75501372173124
WebpackStandard HomeuiStartup15271318202715015991851
load1265108215419513301439
domContentLoaded1265108215409513291439
domInteractive71272034299148
firstPaint------
backgroundConnect50171783351126
firstReactRender27198293039
getState177143231468
initialActions105122
loadScripts1235106815198912931404
setupStore13588131346
numNetworkReqs1256716762
WebpackPower User HomeuiStartup32342181637598240985027
load16021097281452020882649
domContentLoaded16011097281452020882649
domInteractive13327107121298969
firstPaint------
backgroundConnect2362813163322081114
firstReactRender68382894565142
getState325821363302505983
initialActions3072827
loadScripts14851073264144814842565
setupStore1265109021592624
numNetworkReqs76541372275125
📊 Page Load Benchmark Results

Current Commit: 805f210 | Date: 12/4/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±40ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 717ms (±38ms) 🟢 | historical mean value: 726ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±12ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 40ms 1.01s 1.34s 1.06s 1.34s
domContentLoaded 717ms 38ms 696ms 1.00s 736ms 1.00s
firstPaint 75ms 12ms 60ms 176ms 88ms 176ms
firstContentfulPaint 75ms 12ms 60ms 176ms 88ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@metamaskbot
Copy link
Collaborator

Builds ready [4570699]
UI Startup Metrics (1256 ± 87 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1256104414508713251402
load104986112488110921212
domContentLoaded104385512408110871205
domInteractive2915164262394
firstPaint55895124840810361185
backgroundConnect22020127113226244
firstReactRender30206993447
getState3716126184467
initialActions107112
loadScripts829658103081877992
setupStore1364071531
numNetworkReqs1056715560
BrowserifyPower User HomeuiStartup20781772271222421972525
load1052909139212110911337
domContentLoaded1040903138612110791326
domInteractive33181442332107
firstPaint5479913584039811305
backgroundConnect282207796136246655
firstReactRender57439086169
getState18714930528201241
initialActions1014112
loadScripts82169411561188481098
setupStore17104971638
numNetworkReqs80642332974152
WebpackStandard HomeuiStartup809696104067830953
load62756381860649773
domContentLoaded62355581159643767
domInteractive251586182382
firstPaint20676741120211590
backgroundConnect1064551017
firstReactRender27184263139
getState271357113646
initialActions104111
loadScripts62055380258641757
setupStore1063041316
numNetworkReqs1057216559
WebpackPower User HomeuiStartup14541182207822215541969
load627548105190643862
domContentLoaded619542104591635856
domInteractive3015202282799
firstPaint278103826188314646
backgroundConnect52755713315533
firstReactRender54449395973
getState17214324620179222
initialActions102112
loadScripts617541103789633850
setupStore1453671336
numNetworkReqs1176229958149231
FirefoxBrowserifyStandard HomeuiStartup13971140182014914851730
load1132964148710811911400
domContentLoaded1132964148710811881400
domInteractive66322013685161
firstPaint------
backgroundConnect57182033576133
firstReactRender24194652537
getState147134161226
initialActions102122
loadScripts109894314259711441315
setupStore196236331265
numNetworkReqs1256616760
BrowserifyPower User HomeuiStartup30992159529191040924728
load1371956258950013712486
domContentLoaded1370956258850013702485
domInteractive10432100811099269
firstPaint------
backgroundConnect3002721704094321173
firstReactRender63361522766134
getState3678419133444941158
initialActions3073923
loadScripts1209941249133512312213
setupStore15951788289127762
numNetworkReqs77501422273124
WebpackStandard HomeuiStartup14951269218516915251878
load12391093158710812881449
domContentLoaded12381093158610812881449
domInteractive62251943583129
firstPaint------
backgroundConnect48202273644122
firstReactRender27206562835
getState136180191322
initialActions103122
loadScripts1210106215599912611411
setupStore176227331269
numNetworkReqs1256817763
WebpackPower User HomeuiStartup34122420574692543885127
load16941202311154917362948
domContentLoaded16931202311154917362948
domInteractive1093136283105342
firstPaint------
backgroundConnect3002713223764121248
firstReactRender77452844078157
getState318791528260408848
initialActions311041026
loadScripts15421153291740916522530
setupStore1249762173119595
numNetworkReqs78511462473132
📊 Page Load Benchmark Results

Current Commit: 4570699 | Date: 12/4/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±63ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±76ms) 🟢 | historical mean value: 725ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 88ms (±126ms) 🟢 | historical mean value: 79ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 63ms 1.01s 1.37s 1.24s 1.37s
domContentLoaded 731ms 76ms 699ms 1.28s 926ms 1.28s
firstPaint 88ms 126ms 56ms 1.34s 92ms 1.34s
firstContentfulPaint 88ms 126ms 56ms 1.34s 92ms 1.34s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@metamaskbot
Copy link
Collaborator

Builds ready [026d725]
UI Startup Metrics (1263 ± 102 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12631041157410213221439
load105487813378911091225
domContentLoaded104887213228811061217
domInteractive2615106212395
firstPaint579107133942510551227
backgroundConnect22019224210228236
firstReactRender29207293249
getState3816160244097
initialActions107112
loadScripts8346691100858811002
setupStore1172441221
numNetworkReqs1157017565
BrowserifyPower User HomeuiStartup20161690277322321552388
load1025894167713310601325
domContentLoaded1014888166813310531296
domInteractive3116112212992
firstPaint5129813684029691274
backgroundConnect270199837130239587
firstReactRender523911495766
getState19614369377203262
initialActions102112
loadScripts80168413931288291090
setupStore1774381637
numNetworkReqs79642252675150
WebpackStandard HomeuiStartup805690107279834990
load62655693171650803
domContentLoaded62255292571645791
domInteractive251496192279
firstPaint22994810167196660
backgroundConnect953051120
firstReactRender2819156143137
getState271370103444
initialActions103112
loadScripts61955091069643783
setupStore1164051221
numNetworkReqs1157116561
WebpackPower User HomeuiStartup16611255237927018912181
load6885871166102711920
domContentLoaded6805821157102703910
domInteractive35181772831110
firstPaint285110889201313736
backgroundConnect1338674220115591
firstReactRender5947119106476
getState17914226123187229
initialActions104112
loadScripts6775801148100701907
setupStore171061101543
numNetworkReqs78621712473148
FirefoxBrowserifyStandard HomeuiStartup13131087187815413731652
load107594213938811281252
domContentLoaded107594213928811271252
domInteractive58312483381112
firstPaint------
backgroundConnect49211713361136
firstReactRender24184062536
getState186189311277
initialActions102112
loadScripts104692613697910921195
setupStore185190281458
numNetworkReqs1156516662
BrowserifyPower User HomeuiStartup30371942511689539614628
load13931001279148214682543
domContentLoaded13931001279148114682543
domInteractive1023333971103282
firstPaint------
backgroundConnect3042919754193601201
firstReactRender5936210256196
getState311881278262423861
initialActions3167823
loadScripts1263977261132713742118
setupStore1297789177136653
numNetworkReqs79561422375126
WebpackStandard HomeuiStartup14861280199315015781778
load12251071153810612981449
domContentLoaded12251070153710612971449
domInteractive62261973784126
firstPaint------
backgroundConnect4417167254596
firstReactRender27208192837
getState156188231345
initialActions103112
loadScripts1199104715109912721391
setupStore14596141248
numNetworkReqs1256817763
WebpackPower User HomeuiStartup32432373565887941994780
load15601133289745515692764
domContentLoaded15591132289745615692763
domInteractive11430954122101347
firstPaint------
backgroundConnect2522812033372171145
firstReactRender72403895265157
getState315811133264440885
initialActions208123
loadScripts14521107271334015272477
setupStore14271104228120709
numNetworkReqs79571462474133
📊 Page Load Benchmark Results

Current Commit: 026d725 | Date: 12/4/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±42ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 736ms (±39ms) 🟢 | historical mean value: 729ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±13ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 42ms 1.03s 1.37s 1.09s 1.37s
domContentLoaded 736ms 39ms 713ms 1.03s 765ms 1.03s
firstPaint 79ms 13ms 60ms 200ms 88ms 200ms
firstContentfulPaint 79ms 13ms 60ms 200ms 88ms 200ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@metamaskbot
Copy link
Collaborator

Builds ready [bc7f02b]
UI Startup Metrics (1289 ± 111 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12891060176011113541462
load1079891155110211341266
domContentLoaded1072885154610011271259
domInteractive3116233322397
firstPaint52285157342010201202
backgroundConnect23020326813238254
firstReactRender322179113558
getState3916126214497
initialActions104112
loadScripts8506741307989011023
setupStore1273751325
numNetworkReqs1157017561
BrowserifyPower User HomeuiStartup20641788272020321792478
load1025907154112510331367
domContentLoaded1010895152212510181354
domInteractive3618182273592
firstPaint62210515634169931365
backgroundConnect255202742103232560
firstReactRender5638107136090
getState19014466255199243
initialActions105112
loadScripts80168812561208011139
setupStore2085392547
numNetworkReqs1586827455208252
WebpackStandard HomeuiStartup82270099268854980
load63956180466678793
domContentLoaded63455779966674788
domInteractive2615110202287
firstPaint22390814163201696
backgroundConnect106699925
firstReactRender28208783238
getState261392123444
initialActions105112
loadScripts63155479064672780
setupStore1051831216
numNetworkReqs1056916561
WebpackPower User HomeuiStartup15911272232822216982025
load6885841369108701894
domContentLoaded6785791349108689887
domInteractive36182183037108
firstPaint30998958217345732
backgroundConnect71763716019574
firstReactRender60459696676
getState17613322219186216
initialActions103112
loadScripts6755771340106687878
setupStore19955102147
numNetworkReqs1676540566212300
FirefoxBrowserifyStandard HomeuiStartup13301074192615914191641
load109891714829911541237
domContentLoaded109891214829911531229
domInteractive62312433784127
firstPaint------
backgroundConnect50212263749139
firstReactRender22183942335
getState1168791022
initialActions103112
loadScripts106990014598911271197
setupStore136138171138
numNetworkReqs1156416660
BrowserifyPower User HomeuiStartup26502120380728027973053
load12291052177115612531618
domContentLoaded12281052177115612531617
domInteractive13044489101119420
firstPaint------
backgroundConnect148381131155146435
firstReactRender65411461868105
getState312361241241384852
initialActions218227
loadScripts11871003174314911931573
setupStore20014831223278745
numNetworkReqs82602613079149
WebpackStandard HomeuiStartup14811274202514115591800
load12191064161410012811433
domContentLoaded12191064161310012811433
domInteractive57261823478134
firstPaint------
backgroundConnect47201803249129
firstReactRender27208392839
getState177193271276
initialActions103122
loadScripts1191103415879312571369
setupStore1253981234
numNetworkReqs1256716763
WebpackPower User HomeuiStartup30312218831392129354840
load15621163642967315732836
domContentLoaded15611163642867315732836
domInteractive196324529480112965
firstPaint------
backgroundConnect173221967254155491
firstReactRender62391942360107
getState272621096233322836
initialActions203122
loadScripts14921123640664215092755
setupStore1485785204154688
numNetworkReqs82602182579137
📊 Page Load Benchmark Results

Current Commit: bc7f02b | Date: 12/5/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±71ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±69ms) 🟢 | historical mean value: 724ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±11ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 71ms 1.00s 1.32s 1.26s 1.32s
domContentLoaded 731ms 69ms 698ms 1.00s 942ms 1.00s
firstPaint 75ms 11ms 60ms 164ms 88ms 164ms
firstContentfulPaint 75ms 11ms 60ms 164ms 88ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@gauthierpetetin gauthierpetetin force-pushed the feat/jest-custom-console-reporter branch from bc7f02b to 026d725 Compare December 5, 2025 10:45
@metamaskbot
Copy link
Collaborator

Builds ready [09986f3]
UI Startup Metrics (1234 ± 102 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12341033156710213041401
load102289213708710721192
domContentLoaded101788713648610671179
domInteractive2615102192280
firstPaint5358712113989841177
backgroundConnect21719825511221238
firstReactRender3019157153251
getState3616127193985
initialActions106114
loadScripts806675114584852971
setupStore1173451221
numNetworkReqs1157118568
BrowserifyPower User HomeuiStartup19931649258620220862450
load1009887161412910041336
domContentLoaded99487816041309901325
domInteractive3316134233293
firstPaint5699913933979621296
backgroundConnect254203696105227576
firstReactRender5440112115776
getState18412870858195230
initialActions107113
loadScripts78867513601257821110
setupStore20104582342
numNetworkReqs1516640360205258
WebpackStandard HomeuiStartup8317051268808571004
load643574100472665810
domContentLoaded63856899872660805
domInteractive2616138202282
firstPaint23383857169223645
backgroundConnect1166381226
firstReactRender28204563338
getState261364103546
initialActions105113
loadScripts63656699071658798
setupStore1152431417
numNetworkReqs1057516557
WebpackPower User HomeuiStartup17021341235423618532177
load716609100390726933
domContentLoaded70660399690715926
domInteractive39191522938129
firstPaint307121968200350741
backgroundConnect63769715120573
firstReactRender59479086573
getState209145793102205250
initialActions104112
loadScripts70360198789713918
setupStore23774142755
numNetworkReqs1616730459216278
FirefoxBrowserifyStandard HomeuiStartup13261101177415114131622
load109194814809911431296
domContentLoaded109094814799911431296
domInteractive61301533183130
firstPaint------
backgroundConnect51222884059135
firstReactRender22183842335
getState157203251029
initialActions109112
loadScripts106090914538911121233
setupStore155195251032
numNetworkReqs1156516660
BrowserifyPower User HomeuiStartup26311979477461226444321
load1183942274030111721473
domContentLoaded1183942274030211711473
domInteractive1143040982110310
firstPaint------
backgroundConnect132331153154134425
firstReactRender5838131156289
getState27878979205377717
initialActions3136523
loadScripts1140923256624611321452
setupStore1767846213191695
numNetworkReqs81571622579152
WebpackStandard HomeuiStartup15671246218417616451939
load12831091158310613551459
domContentLoaded12831091158210613541458
domInteractive61271613482130
firstPaint------
backgroundConnect59223295064167
firstReactRender292177103042
getState196203291482
initialActions103122
loadScripts1249106114669513191429
setupStore175190271147
numNetworkReqs1256717763
WebpackPower User HomeuiStartup29532172513071331324416
load14971101290045115262705
domContentLoaded14961101290045115262705
domInteractive145291057178131436
firstPaint------
backgroundConnect1992411642761801018
firstReactRender64392973362124
getState25869933223375826
initialActions2135323
loadScripts13981087268832414772270
setupStore1366731190146648
numNetworkReqs83591622484142
📊 Page Load Benchmark Results

Current Commit: 09986f3 | Date: 12/5/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±38ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 721ms (±36ms) 🟢 | historical mean value: 725ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±10ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 38ms 1.01s 1.33s 1.05s 1.33s
domContentLoaded 721ms 36ms 702ms 1.00s 734ms 1.00s
firstPaint 76ms 10ms 56ms 148ms 88ms 148ms
firstContentfulPaint 76ms 10ms 56ms 148ms 88ms 148ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@gauthierpetetin gauthierpetetin marked this pull request as ready for review December 5, 2025 11:34

- name: test:integration:coverage
run: yarn test:integration:coverage --silent
run: yarn test:integration:coverage
Copy link
Contributor Author

@gauthierpetetin gauthierpetetin Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to remove the --silent flag to be able to detect new warnings/errors

filePath,
warnings: currentWarnings,
});
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: New files with warnings appear in two sections

When a new test file with warnings is detected, it gets added to both this.newFiles and this.violations arrays. This causes the same warnings to be displayed twice in the output: once in the "BASELINE VIOLATIONS DETECTED" section (with 🆕 NEW markers) and again in the "NEW FILES" section. The _printResults method calls both _printViolations() and _printNewFiles() when both contain the same file's data, leading to duplicate and confusing output. The test still correctly fails, but the reporting is redundant.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template size-XL team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants