diff --git a/apps/server/vitest.config.ts b/apps/server/vitest.config.ts index faeecd98..aae12c78 100644 --- a/apps/server/vitest.config.ts +++ b/apps/server/vitest.config.ts @@ -17,12 +17,12 @@ export default defineConfig({ "src/routes/**", // Routes are better tested with integration tests ], thresholds: { - // Thresholds lowered after moving lib files to shared packages - // TODO: Gradually increase as we add more tests - lines: 55, - functions: 50, - branches: 50, - statements: 55, + // Increased thresholds to ensure better code quality + // Current coverage: 64% stmts, 56% branches, 78% funcs, 64% lines + lines: 60, + functions: 75, + branches: 55, + statements: 60, }, }, include: ["tests/**/*.test.ts", "tests/**/*.spec.ts"], diff --git a/libs/dependency-resolver/vitest.config.ts b/libs/dependency-resolver/vitest.config.ts new file mode 100644 index 00000000..a54b8f72 --- /dev/null +++ b/libs/dependency-resolver/vitest.config.ts @@ -0,0 +1,21 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + globals: true, + environment: "node", + include: ["tests/**/*.test.ts"], + coverage: { + provider: "v8", + reporter: ["text", "json", "html"], + include: ["src/**/*.ts"], + exclude: ["src/**/*.d.ts", "src/index.ts"], + thresholds: { + lines: 90, + functions: 100, + branches: 85, + statements: 90, + }, + }, + }, +}); diff --git a/libs/git-utils/vitest.config.ts b/libs/git-utils/vitest.config.ts new file mode 100644 index 00000000..dfc57da1 --- /dev/null +++ b/libs/git-utils/vitest.config.ts @@ -0,0 +1,21 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + globals: true, + environment: "node", + include: ["tests/**/*.test.ts"], + coverage: { + provider: "v8", + reporter: ["text", "json", "html"], + include: ["src/**/*.ts"], + exclude: ["src/**/*.d.ts", "src/index.ts", "src/types.ts"], + thresholds: { + lines: 65, + functions: 75, + branches: 35, + statements: 65, + }, + }, + }, +}); diff --git a/libs/platform/vitest.config.ts b/libs/platform/vitest.config.ts index dbea81f2..2a441396 100644 --- a/libs/platform/vitest.config.ts +++ b/libs/platform/vitest.config.ts @@ -8,6 +8,16 @@ export default defineConfig({ coverage: { provider: "v8", reporter: ["text", "json", "html"], + include: ["src/**/*.ts"], + exclude: ["src/**/*.d.ts", "src/index.ts"], + thresholds: { + // Current overall coverage: ~64% (only subprocess.ts well tested) + // Set realistic thresholds until more files are tested + lines: 60, + functions: 40, + branches: 60, + statements: 60, + }, }, }, }); diff --git a/libs/utils/vitest.config.ts b/libs/utils/vitest.config.ts new file mode 100644 index 00000000..62681b2d --- /dev/null +++ b/libs/utils/vitest.config.ts @@ -0,0 +1,23 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + globals: true, + environment: "node", + include: ["tests/**/*.test.ts"], + coverage: { + provider: "v8", + reporter: ["text", "json", "html"], + include: ["src/**/*.ts"], + exclude: ["src/**/*.d.ts", "src/index.ts"], + thresholds: { + // Current overall coverage: ~19% (only error-handler.ts tested) + // Set modest thresholds until more files are tested + lines: 15, + functions: 15, + branches: 25, + statements: 15, + }, + }, + }, +});