• v4.0.1 883cc34872

    v4.0.1
    All checks were successful
    CI / build-and-test (push) Successful in 1m32s
    Stable

    joeyr released this 2026-08-09 00:01:41 -05:00 | 2 commits to main since this release

    Changed

    • The test suite runs in about a third of the wall clock, with no coverage
      given up.
      Two independent causes, both pure waste:

      • Renderer interaction tests now share a setupUser() helper that passes
        delay: null to userEvent. The default delay: 0 awaits a real macrotask
        between every sub-event of an interaction (pointerover → pointerdown →
        mousedown → focus → pointerup → mouseup → click), so an interaction test's
        cost was set by timer scheduling rather than by the component. The same
        events fire in the same order with the same assertions available between
        them; only the waiting is gone. In isolation settings-panel.test.tsx went
        from 4191 ms to 937 ms.

      • Only 21 of the 86 unit test files touch the DOM, but all of them ran under
        jsdom. test/unit/renderer/** is now its own renderer project and the
        other 65 run in node. That cost was invisible in the per-file durations
        Vitest prints — about 1 ms there — because it lands in the run summary's
        environment total, which was 510 s on CI.

      Locally the full suite went from ~45 s to ~17 s, and environment from 264 s
      to 57 s. npm run test:unit runs both halves, so the split is invisible to
      the scripts and to CI. All 1054 tests still pass.

    Fixed

    • Two Vitest projects were handed the same define object reference. Vitest
      mutates it in place while resolving a project, so the second clobbered the
      first and __APP_VERSION__ survived as a bare identifier — every test that
      renders App died on ReferenceError. Each project now spreads its own copy.
      No user-facing effect; recorded because the failure is remote from its cause.
    Downloads