Build the public describe/test/it API for a runner adapter.
Both the jest and vitest entrypoints expose the identical surface; the only
thing that differs between them is how the RunnerHooks are obtained
(vitest imports them statically, jest resolves them lazily from globals).
That difference is captured by getHooks, which is invoked once per
declaration so adapters are free to resolve hooks lazily.
The JSDoc that surfaces in editors lives on the PhoenixDescribe and
PhoenixTest interfaces rather than the implementations below, so the
docs survive the export const { describe, test, it } = createTestApi(...)
destructuring in each adapter.
Build the public
describe/test/itAPI for a runner adapter.Both the jest and vitest entrypoints expose the identical surface; the only thing that differs between them is how the RunnerHooks are obtained (vitest imports them statically, jest resolves them lazily from globals). That difference is captured by
getHooks, which is invoked once per declaration so adapters are free to resolve hooks lazily.The JSDoc that surfaces in editors lives on the PhoenixDescribe and PhoenixTest interfaces rather than the implementations below, so the docs survive the
export const { describe, test, it } = createTestApi(...)destructuring in each adapter.