Files
openhuman/test/vitest.config.ts
T
Steven Enamakel 97358a4ea6 refactor: rename project from AlphaHuman to OpenHuman and update configurations
- Deleted obsolete .mcp.json file.
- Updated ESLint and test configurations to reflect new file paths.
- Changed title and branding in index.html and README.md to OpenHuman.
- Adjusted package.json scripts for testing with new configuration files.
- Modified E2E test scripts to use updated WebDriverIO configuration paths.
- Added new TypeScript configuration files for E2E testing and Vitest.
2026-03-19 10:48:08 -07:00

63 lines
1.5 KiB
TypeScript

import { defineConfig } from "vitest/config";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import path from "path";
import { fileURLToPath } from "url";
const configDir = path.dirname(fileURLToPath(import.meta.url));
const projectRoot = path.resolve(configDir, "..");
export default defineConfig({
root: projectRoot,
plugins: [
nodePolyfills({
include: ["buffer", "process", "util", "os", "crypto", "stream"],
globals: {
Buffer: true,
process: true,
global: true,
},
}),
],
resolve: {
alias: {
buffer: "buffer",
process: "process/browser",
util: "util",
os: "os-browserify/browser",
},
},
test: {
globals: true,
environment: "jsdom",
mockReset: true,
restoreMocks: true,
setupFiles: ["src/test/setup.ts"],
include: ["src/**/*.test.{ts,tsx}"],
hookTimeout: 30000,
testTimeout: 30000,
coverage: {
provider: "v8",
include: ["src/**/*.{ts,tsx}"],
exclude: [
"src/main.tsx",
"src/vite-env.d.ts",
"src/**/*.d.ts",
"src/test/**",
"src/__tests__/**",
"src/**/__tests__/**",
"src/**/*.test.{ts,tsx}",
"src/**/types.ts",
"src/**/types/*.ts",
"src/types/**",
],
reporter: ["text", "text-summary", "html", "lcov"],
thresholds: {
lines: 15,
statements: 15,
functions: 15,
branches: 12,
},
},
},
});