mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 14:07:49 +01:00
The Vite/React/TS dice solver had no git history yet. Commit it alongside a run.sh that ensures Node/pnpm are present, installs deps, and starts the dev server with a single command. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
29 lines
796 B
TypeScript
29 lines
796 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5174,
|
|
},
|
|
test: {
|
|
environment: "jsdom",
|
|
globals: true,
|
|
setupFiles: ["./src/test/setup.ts"],
|
|
coverage: {
|
|
provider: "v8",
|
|
include: ["src/**/*.{ts,tsx}"],
|
|
// main.tsx is the DOM bootstrap and solver.worker.ts is the worker
|
|
// entrypoint: both are pure wiring with no branches worth asserting, and
|
|
// neither can run under jsdom without mocking away the thing under test.
|
|
exclude: ["src/main.tsx", "src/worker/solver.worker.ts", "src/test/**"],
|
|
thresholds: {
|
|
statements: 100,
|
|
branches: 100,
|
|
functions: 100,
|
|
lines: 100,
|
|
},
|
|
},
|
|
},
|
|
});
|