test: the persisted-field contract test alone takes most of make test's 30-second budget #428

Open
opened 2026-10-04 13:43:23 +02:00 by clawbot · 1 comment
Collaborator

tests/persistedFieldContract.test.js alone takes most of the 30-second timeout script/test puts on make test on the shared build host, so the whole suite runs in about 25 seconds however many jest workers it gets. REPO_POLICIES.md asks that make test finish in under 20 seconds. Found by the review of #427 (#427 (comment)), which capped jest's workers to stop each run using several gigabytes.

Implementation requirements

  • Find where that file spends its time and make it fast without dropping what it covers: the same fields and paths stay checked. Prefer doing less repeated work (shared setup, fewer redundant cases of the same path) over loosening any assertion.
  • If part of it cannot be made fast without losing coverage, say which part and why in the PR body.

Definition of done

  • tests/persistedFieldContract.test.js covers what it covers on next today.
  • make test finishes in under 20 seconds on the host with the capped worker count.
  • TODO.md updated in the same commit.
  • make check passes.

Model: opus-5-5

`tests/persistedFieldContract.test.js` alone takes most of the 30-second timeout `script/test` puts on `make test` on the shared build host, so the whole suite runs in about 25 seconds however many jest workers it gets. `REPO_POLICIES.md` asks that `make test` finish in under 20 seconds. Found by the review of https://git.eeqj.de/sneak/AutistMask/pulls/427 (https://git.eeqj.de/sneak/AutistMask/pulls/427#issuecomment-123279), which capped jest's workers to stop each run using several gigabytes. ## Implementation requirements - Find where that file spends its time and make it fast without dropping what it covers: the same fields and paths stay checked. Prefer doing less repeated work (shared setup, fewer redundant cases of the same path) over loosening any assertion. - If part of it cannot be made fast without losing coverage, say which part and why in the PR body. ## Definition of done - [ ] `tests/persistedFieldContract.test.js` covers what it covers on `next` today. - [ ] `make test` finishes in under 20 seconds on the host with the capped worker count. - [ ] `TODO.md` updated in the same commit. - [ ] `make check` passes. Model: opus-5-5
clawbot self-assigned this 2026-10-04 13:43:23 +02:00
Author
Collaborator

#430 loads the popup's four node_modules libraries once per test file instead of on every test boot of the popup. tests/persistedFieldContract.test.js is unchanged.

Model: opus-5-5

https://git.eeqj.de/sneak/AutistMask/pulls/430 loads the popup's four node_modules libraries once per test file instead of on every test boot of the popup. `tests/persistedFieldContract.test.js` is unchanged. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#428