tsconfig.test.json1.4 KBView on GitHub
{
  // Test-only typecheck. Split out of tsconfig.json so the default `types` gate covers
  // shipping sources only (mirrors apps/server). Tests stay typechecked via `types:test`.
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "noEmit": true,
    // jest.setup.js requires @testing-library/jest-dom for real, so its matcher augmentation has
    // to be in scope here or every `toBeInTheDocument` is a compile error while passing at runtime.
    // Not in tsconfig.json's `types`: shipping sources must not see test-only globals.
    "types": ["node", "vite/client", "jest", "@testing-library/jest-dom"]
  },
  // Restated, NOT inherited: `extends` does not carry `references`. Without it the project-
  // reference redirect never engages, so `@zero/server/schemas` / `/auth` — which the package
  // exports as raw `./src/**.ts`, not as declarations — drag ~940 server files into this run
  // under MAIL's compilerOptions (no server `paths`, so `runtime/platform`,
  // `lib/logging/tracing` et al. all fail to resolve). With the reference present they redirect
  // to apps/server's emitted declarations, exactly as they do under the `types` gate.
  "references": [{ "path": "../server" }],
  "include": [
    "**/*.test.ts",
    "**/*.test.tsx",
    "**/__tests__/**/*.ts",
    "**/__tests__/**/*.tsx",
    "tests/**/*.ts",
    "tests/**/*.tsx",
    "runtime-configuration.d.ts"
  ],
  "exclude": ["node_modules"]
}