import { defineConfig } from 'vitest/config'; export default defineConfig({ // Plan 01-11: declare `__MOKOSH_UAT__` as `false` for vitest's own // SOURCE-loading test runs. Vitest's load pipeline goes through Vite, // so `define` text-replaces the token in any source the test files // import — keeping the gated test-hook dynamic imports (in // src/background/index.ts + src/offscreen/recorder.ts) as static // dead branches under unit tests. Without this, vitest would throw // `ReferenceError: __MOKOSH_UAT__ is not defined` when loading those // sources, OR would activate the hooks and clobber the existing // vi.fn() chrome.* mocks the 83-test baseline relies on. // Reference: https://vite.dev/config/shared-options.html#define define: { __MOKOSH_UAT__: 'false', }, test: { environment: 'node', include: ['tests/**/*.test.ts'], reporters: 'dot', typecheck: { enabled: false, }, }, });