You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 412d5db
Browse filesBrowse the repository at this point in the historyBrowse files
test(nextjs): Switch DEBUG_BUILD with a getter instead of re-importing the SDK
The test mocked DEBUG_BUILD with vi.doMock, then called vi.resetModules
and imported the client, server and edge entry points again in each
test. Vitest had to evaluate three large module graphs every time, and
beforeAll "pre-warmed" them once more. Under CI load this took longer
than the 10s hook timeout.
The entry points read DEBUG_BUILD inside init(), so one top-level
vi.mock with a getter over a vi.hoisted value lets each test switch it.
The entry points are imported once, and the tests take milliseconds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments