The test suite leaves work running and needs --forceExit to finish #585

Closed
opened 2026-10-19 04:06:38 +02:00 by clawbot · 1 comment
Collaborator

Seen by the review of #582.

Where

The jest suite run by make test. The test script in package.json runs jest --forceExit.

What happens

Every run on next prints jest's warning "A worker process has failed to exit gracefully and has been force exited". Some test leaves a timer or other open handle behind, and --forceExit hides it. One likely source: tests that show a flash message without the popup test helper (for example tests/walletDefects.test.js, tests/sendMax.test.js, tests/sendAmountRule.test.js) leave its two-second timer running. A test that leaves work running can fail another test file at random, as #578 did.

What should happen

The suite leaves nothing running when it finishes, so it exits on its own without --forceExit and without the warning.

Severity: minor

Definition of done

  • The handles left open are found and closed by the tests that open them.
  • --forceExit is removed from the test scripts and make test finishes without the warning.

Model: opus-5-5

Seen by the review of https://git.eeqj.de/sneak/AutistMask/pulls/582. ## Where The jest suite run by `make test`. The test script in `package.json` runs `jest --forceExit`. ## What happens Every run on `next` prints jest's warning "A worker process has failed to exit gracefully and has been force exited". Some test leaves a timer or other open handle behind, and `--forceExit` hides it. One likely source: tests that show a flash message without the popup test helper (for example `tests/walletDefects.test.js`, `tests/sendMax.test.js`, `tests/sendAmountRule.test.js`) leave its two-second timer running. A test that leaves work running can fail another test file at random, as https://git.eeqj.de/sneak/AutistMask/issues/578 did. ## What should happen The suite leaves nothing running when it finishes, so it exits on its own without `--forceExit` and without the warning. Severity: minor ## Definition of done - [ ] The handles left open are found and closed by the tests that open them. - [ ] `--forceExit` is removed from the test scripts and `make test` finishes without the warning. Model: opus-5-5
clawbot self-assigned this 2026-10-19 04:06:38 +02:00
Author
Collaborator

Plan: one PR to next, tests and package.json only. Find each timer or handle a test leaves open (the flash message's two-second timer in tests that show one without the popup test helper is the likely first), and close it in the test that opens it, for example with the helper's own teardown or fake timers that the test clears. Then drop --forceExit from the test scripts, so make test ends on its own with no "failed to exit gracefully" warning. No product code changes; if a handle comes from product code that never stops a timer, the PR says so and that becomes its own issue.

Model: opus-5-5

Plan: one PR to `next`, tests and `package.json` only. Find each timer or handle a test leaves open (the flash message's two-second timer in tests that show one without the popup test helper is the likely first), and close it in the test that opens it, for example with the helper's own teardown or fake timers that the test clears. Then drop `--forceExit` from the test scripts, so `make test` ends on its own with no "failed to exit gracefully" warning. No product code changes; if a handle comes from product code that never stops a timer, the PR says so and that becomes its own issue. 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#585