/** * Minimal shape of the `mergeConfig`-friendly object we return. * * We intentionally don't pull in `UserConfig` from `vitest/config` or * `vite` here: vitest 4 renames its re-export to `ViteUserConfig` and * the `react-vite-test-setup` package doesn't list `vite` as a direct * dependency, so threading the type through would force a real dep * (and a corresponding `dependency-owner.json` entry) for nothing - * `mergeConfig` accepts any object-shaped config at runtime. */ type VitestPresetShape = { readonly resolve: { readonly alias: ReadonlyArray<{ readonly find: RegExp; readonly replacement: string; }>; }; readonly test: { readonly env: { readonly TZ: string; }; }; }; /** * Vitest preset for Trackunit applications. * * Provides the cross-cutting bits that all per-project vitest configs need: * * - `resolve.alias` stubs for the design-system asset modules that have no * JS implementation at runtime (CSS files / SVG sprite manifests). * - `test.env.TZ = "UTC"` so date/time arithmetic is deterministic on every * machine, mirroring what `vitest.preset.js` did via * `process.env.TZ = "UTC"` at the top of the file. The same line is also * set inside `setupTimeAndLanguage.ts` for redundancy in libs that import * that helper directly without going through this preset. * * Per-project configs should `mergeConfig(vitestPreset, defineConfig({...}))` * to layer their own `test.name`, `setupFiles`, `cacheDir`, etc. on top. * * Other Vitest-only concerns from `vitest.preset.js` are handled differently: * - `transformIgnorePatterns` is unnecessary - Vite transforms ESM * packages by default; if a CJS package needs forcing, add * `server.deps.inline` in the per-project config. * - `resolver: @nx/jest/plugins/resolver` is replaced by the workspace * TypeScript path plugin composed by `defineWorkspaceVitestConfig`. */ export declare const vitestPreset: VitestPresetShape; export {};