mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
26 lines
731 B
TypeScript
26 lines
731 B
TypeScript
import { createScopedVitestConfig } from "./vitest.scoped-config.ts";
|
|
|
|
export function createTasksVitestConfig(env?: Record<string, string | undefined>) {
|
|
const config = createScopedVitestConfig(["src/tasks/**/*.test.ts"], {
|
|
dir: "src",
|
|
env,
|
|
name: "tasks",
|
|
passWithNoTests: true,
|
|
});
|
|
// Task tests mutate process.env and shared singleton registries/state dirs.
|
|
// Keep files serialized so temp-dir-backed sqlite stores do not fight each
|
|
// other under the non-isolated runner.
|
|
config.test = {
|
|
...config.test,
|
|
maxWorkers: 1,
|
|
fileParallelism: false,
|
|
sequence: {
|
|
...config.test?.sequence,
|
|
groupOrder: 1,
|
|
},
|
|
};
|
|
return config;
|
|
}
|
|
|
|
export default createTasksVitestConfig();
|