Backend (516 tests, 94% coverage): - Add azure_openai endpoint/deployment validation tests (config.py -> 100%) - Add _total_conversations and _avg_turns direct tests (queries.py -> 100%) - Add transformer edge cases: list content, string checkpoint, invalid JSON, malformed message graceful skip (transformer.py -> 93%) - Add safety combined status_code+error_message interaction tests - Fix ambiguous 200/422 assertion to strict 422 - Add E2E pagination shape assertions (total, page, per_page, row count) - Fix ReplayPool mock to respect LIMIT/OFFSET params Frontend (23 tests, vitest + happy-dom + @testing-library/react): - Add vitest infrastructure with happy-dom environment - Add api.ts tests: success, HTTP error, success=false, URL encoding - Add DashboardPage tests: loading, data, error, empty states - Add ReplayListPage tests: loading, empty, data, error, status badge classes - Add ReplayPage tests: loading, steps, empty, error states
25 lines
476 B
TypeScript
25 lines
476 B
TypeScript
/// <reference types="vitest" />
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
environment: "happy-dom",
|
|
globals: true,
|
|
setupFiles: ["./src/test-setup.ts"],
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
"/ws": {
|
|
target: "http://localhost:8001",
|
|
ws: true,
|
|
},
|
|
"/api": {
|
|
target: "http://localhost:8001",
|
|
},
|
|
},
|
|
},
|
|
});
|