Files
openclaw/test/vitest/vitest.runtime-config.config.ts
Peter Steinberger 896592b747 test(vitest): give config creators nameable return types
A vitest/vite type bump made inferred creator return types reach
vite-internal names (TS4058/TS4082), failing check-test-types repo-wide.
Annotate the scoped/extension config roots and the spread-rebuilding
creators with ViteUserConfig; also drop an unused workflow read, mutating
sorts, and an untyped record index left by 1f591bba56.
2026-08-10 09:35:51 -07:00

31 lines
874 B
TypeScript

// Vitest runtime config config wires the runtime config test shard.
import type { ViteUserConfig } from "vitest/config";
import { createScopedVitestConfig } from "./vitest.scoped-config.ts";
export function createRuntimeConfigVitestConfig(
env?: Record<string, string | undefined>,
): ViteUserConfig {
const config = createScopedVitestConfig(["src/config/**/*.test.ts"], {
dir: "src",
env,
includeOpenClawRuntimeSetup: false,
name: "runtime-config",
passWithNoTests: true,
// Native SQLite handles can abort V8 when threaded workers tear down.
// Forks keep database lifetimes inside a disposable process.
pool: "forks",
});
return {
...config,
test: {
...config.test,
sequence: {
...config.test?.sequence,
groupOrder: 3,
},
},
};
}
export default createRuntimeConfigVitestConfig();