Files
webmail/lib
Stefan Hildebrandt 5fc32c4e89 test(config-route): isolate env with vi.stubEnv, fix secret-file race
The suite intermittently failed "settingsSync ... SESSION_SECRET_FILE" under
full parallel load (passed in isolation). Two causes:

- env vars were mutated directly on the shared process.env, so other test
  files in the same worker could leak in. Use vi.stubEnv + unstubAllEnvs so
  each test's env is isolated and auto-restored, and stub the managed vars to
  undefined in beforeEach for a clean baseline.
- both SESSION_SECRET_FILE tests wrote a shared relative ./session-secret and
  removed it with a fire-and-forget async unlink; under load the pending
  unlink from the first test fired during the second (after write, before
  read), so the file was missing. Use a unique temp file per test, removed
  synchronously in afterEach.

Verified: 17/17, stable across repeated runs and with hostile env
(APP_NAME/SETTINGS_SYNC_ENABLED/SESSION_SECRET) set in the real environment.
2026-08-16 21:32:23 +02:00
..
2026-05-30 15:58:39 +02:00
2026-04-16 19:07:42 +02:00
2026-04-16 19:07:42 +02:00