test: load the popup's libraries once per test file, not on every boot #430

Merged
clawbot merged 1 commits from issue-428-persisted-field-test-speed into next 2026-10-04 16:59:13 +02:00
1 Commits
Author SHA1 Message Date
sneak 1830e7cb68 test: load the popup's libraries once per test file, not on every boot (closes #428)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
Every popup boot in the tests resets jest's module registry so that src/
loads fresh, and that also reloaded ethers, libsodium-wrappers-sumo, qrcode
and ethereum-blockies-base64 each time. tests/support/popupBoot.js now loads
those four once per test file and registers them once with jest.doMock(),
which jest.resetModules() keeps, so every boot gets the same copies. No test
or assertion changed. make test takes 8-13s on the shared build host, down
from 17-25s, measured in alternating runs before and after the change.

Model: opus-5-5
2026-10-04 14:27:07 +00:00