Files
automaker/apps/server/vitest.config.ts
Kacper 4d0d15d1d5 ci: add GitHub Actions workflow for test suite
- Added test.yml workflow to run on PRs and pushes to main/master
- Runs server tests with coverage on every PR
- Commented out Codecov integration (can be enabled when token is configured)
- Added test:server:coverage script to root package.json
- Adjusted coverage thresholds to match current coverage levels:
  - lines: 70% (current: 72.73%)
  - statements: 70% (current: 72.65%)
  - branches: 64% (current: 64.66%)
  - functions: 80% (current: 80.87%)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-13 13:43:15 +01:00

38 lines
886 B
TypeScript

import { defineConfig } from "vitest/config";
import path from "path";
export default defineConfig({
test: {
reporters: ['verbose'],
globals: true,
environment: "node",
setupFiles: ["./tests/setup.ts"],
coverage: {
provider: "v8",
reporter: ["text", "json", "html", "lcov"],
include: ["src/**/*.ts"],
exclude: [
"src/**/*.d.ts",
"src/index.ts",
"src/routes/**", // Routes are better tested with integration tests
],
thresholds: {
lines: 70,
functions: 80,
branches: 64,
statements: 70,
},
},
include: ["tests/**/*.test.ts", "tests/**/*.spec.ts"],
exclude: ["**/node_modules/**", "**/dist/**"],
mockReset: true,
restoreMocks: true,
clearMocks: true,
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});