mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-08 06:54:24 +00:00
18 lines
456 B
TypeScript
18 lines
456 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
import baseConfig from "./vitest.config.ts";
|
|
|
|
export function createScopedVitestConfig(include: string[]) {
|
|
const base = baseConfig as unknown as Record<string, unknown>;
|
|
const baseTest = (baseConfig as { test?: { exclude?: string[] } }).test ?? {};
|
|
const exclude = baseTest.exclude ?? [];
|
|
|
|
return defineConfig({
|
|
...base,
|
|
test: {
|
|
...baseTest,
|
|
include,
|
|
exclude,
|
|
},
|
|
});
|
|
}
|