mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-10-19 13:30:37 +00:00
Replaces the cubic `<tool>\s*([\s\S]*?)\s*</tool>`, `<summary>` and `<final_response>` regexes with the shared linear findTagBlocks scanner (sibling of #15066).
Evidence (tip ed664fc8 merged into the head): new test hangs to the 400 s timeout on the tip and passes 6/6 in ~1 s with the fix; 18 Devin/PromptQL neighbor test files green; typecheck:core, check:open-sse-typecheck, eslint, prettier and check-file-size clean.
Thanks @HouMinXi!
61 lines
2.1 KiB
TypeScript
61 lines
2.1 KiB
TypeScript
import { defineConfig } from "vitest/config";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: "jsdom",
|
|
globals: true,
|
|
setupFiles: ["./tests/_setup/vitestUiPolyfills.ts"],
|
|
pool: "threads",
|
|
maxWorkers: 20,
|
|
fileParallelism: true,
|
|
maxConcurrency: 20,
|
|
include: [
|
|
"src/app/**/dashboard/cache/__tests__/**/*.test.tsx",
|
|
"src/app/**/dashboard/endpoint/__tests__/**/*.test.tsx",
|
|
"src/app/**/dashboard/providers/**/__tests__/**/*.test.tsx",
|
|
"src/app/**/dashboard/webhooks/__tests__/**/*.test.tsx",
|
|
"src/app/**/dashboard/discovery/__tests__/**/*.test.tsx",
|
|
"src/shared/hooks/__tests__/**/*.test.tsx",
|
|
"src/lib/memory/__tests__/**/*.test.ts",
|
|
"src/lib/skills/__tests__/**/*.test.ts",
|
|
"tests/unit/encryption.test.ts",
|
|
"tests/unit/**/*.test.tsx",
|
|
"open-sse/**/__tests__/**/*.test.ts",
|
|
"open-sse/services/**/__tests__/**/*.test.ts",
|
|
],
|
|
exclude: [
|
|
// Standard Vitest / tooling exclusions
|
|
"node_modules/**",
|
|
"dist/**",
|
|
"cypress/**",
|
|
".idea/**",
|
|
".git/**",
|
|
".cache/**",
|
|
// Live-server E2E — these drive a real running server, so they must never run
|
|
// in this jsdom job. They have their own runners + vitest.e2e-live.config.ts.
|
|
"tests/e2e/ecosystem.test.ts",
|
|
"tests/e2e/protocol-clients.test.ts",
|
|
],
|
|
|
|
coverage: {
|
|
reportsDirectory: "coverage",
|
|
},
|
|
},
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
// Optional native embeddings are outside the UI unit-test runtime.
|
|
"@huggingface/transformers": path.resolve(
|
|
__dirname,
|
|
"./tests/_setup/transformersUnavailable.ts"
|
|
),
|
|
"@": path.resolve(__dirname, "./src"),
|
|
// Mirrors tsconfig paths. Without it, a UI test importing from open-sse
|
|
// resolves to undefined instead of failing loudly — which silently made
|
|
// every provider look credentialed in the free-tier card tests.
|
|
"@omniroute/open-sse": path.resolve(__dirname, "./open-sse"),
|
|
},
|
|
},
|
|
});
|