Files
openclaw/test/vitest/vitest.tooling.config.ts
Peter Steinberger de5971eedc fix(onboard): preserve rerun config migrations
Fix non-interactive and wizard onboarding reruns so existing agent lists and bindings are preserved unless the user explicitly resets config.

Isolate legacy `plugins.installs` migration into its own write so the config size-drop allowance cannot mask unrelated config loss, while preserving new or repaired install records for the final plugin-index commit. Also keep shrinkwrap generation pinned to pnpm-locked transitive patch versions only when the dependency edge still allows that version, and isolate the tooling Vitest shard that mutates process state.

Fixes #84692.
Replaces #84748.

Co-authored-by: yetval <yetvald@gmail.com>
2026-05-27 18:05:07 +01:00

24 lines
818 B
TypeScript

import { loadPatternListFromEnv } from "./vitest.pattern-file.ts";
import { createScopedVitestConfig } from "./vitest.scoped-config.ts";
import { boundaryTestFiles } from "./vitest.unit-paths.mjs";
export function loadIncludePatternsFromEnv(
env: Record<string, string | undefined> = process.env,
): string[] | null {
return loadPatternListFromEnv("OPENCLAW_VITEST_INCLUDE_FILE", env);
}
export function createToolingVitestConfig(env?: Record<string, string | undefined>) {
return createScopedVitestConfig(
loadIncludePatternsFromEnv(env) ?? ["test/**/*.test.ts", "src/scripts/**/*.test.ts"],
{
env,
exclude: [...boundaryTestFiles, "test/scripts/openclaw-e2e-instance.test.ts"],
name: "tooling",
passWithNoTests: true,
},
);
}
export default createToolingVitestConfig();