Set up unit testing infrastructure
- Extract slot generation logic into apps/api/src/lib/slots.ts for testability - Add 8 unit tests covering slot generation edge cases (overlap, multi-groomer, boundary) - Add @testing-library/react + jsdom to apps/web; configure vitest with jsdom environment - Add 4 component tests for App navigation rendering and active-link highlighting - Remove passWithNoTests: true from both vitest configs; add coverage thresholds Closes #39 Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -1,7 +1,20 @@
|
||||
import { defineConfig } from "vitest/config";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
test: {
|
||||
passWithNoTests: true,
|
||||
environment: "jsdom",
|
||||
setupFiles: ["./src/test/setup.ts"],
|
||||
globals: true,
|
||||
coverage: {
|
||||
provider: "v8",
|
||||
include: ["src/**"],
|
||||
exclude: ["src/test/**", "src/main.tsx"],
|
||||
thresholds: {
|
||||
lines: 50,
|
||||
functions: 50,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user