You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gpt-pilot/vitest.tasks.config.ts

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();