/** * Vitest global-setup module — registers the SurrealDB fixture in THIS file's * module scope (which is where vitest's globalSetup process loads it), then * re-exports the testing-integration `setup` / `teardown` contract. * * Why this wrapper exists: Vitest's globalSetup runs in a separate process * from the test workers. The shared `fixtureRegistry` used by * `createIntegrationSetup` is module-scoped per process. If the fixture is * registered only inside `integration-setup.ts` (which test workers import), * the globalSetup process sees an empty registry and starts no containers. * Pointing vitest's `globalSetup` at THIS file ensures the fixture is in the * same module scope as testing-integration's setup/teardown when they run. * * @module */ import { createIntegrationSetup } from "@suaveplan/testing-integration"; import { SurrealDBFixture } from "@suaveplan/testing-integration-surrealdb"; createIntegrationSetup({ surrealdb: new SurrealDBFixture(), }); export { setup, teardown, } from "@suaveplan/testing-integration/setup/global-setup";