test: load the popup's libraries once per test file, not on every boot (closes #428)
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: more than half of a boot, and tests/persistedFieldContract.test.js boots the popup 321 times. tests/support/popupBoot.js now loads those four once per test file and hands the same copies to every boot. No test or assertion changed. make test takes 10-15s on the shared build host instead of 23-29s. Model: opus-5-5
This commit is contained in:
@@ -45,6 +45,15 @@ but the review is broader than any of them.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-04: `make test` takes 10-15s on the shared build host, down from
|
||||
23-29s ([#428](https://git.eeqj.de/sneak/AutistMask/issues/428)). Each popup
|
||||
boot in the tests (`tests/support/popupBoot.js`) resets jest's module registry
|
||||
so that everything under `src/` loads fresh, and that also reloaded `ethers`,
|
||||
`libsodium-wrappers-sumo`, `qrcode` and `ethereum-blockies-base64` every time:
|
||||
more than half of each boot, and `tests/persistedFieldContract.test.js` boots
|
||||
the popup 321 times. Those four libraries are now loaded once per test file
|
||||
and handed to every boot. No test or assertion changed.
|
||||
|
||||
- 2026-10-04: `make test` runs jest in three worker processes
|
||||
([#426](https://git.eeqj.de/sneak/AutistMask/issues/426)). The `test` and
|
||||
`test:verbose` scripts in `package.json` ran `jest --forceExit`, which starts
|
||||
|
||||
Reference in New Issue
Block a user