mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-06 06:41:08 +00:00
27 lines
869 B
TypeScript
27 lines
869 B
TypeScript
import { acpxExtensionTestRoots } from "./vitest.extension-acpx-paths.mjs";
|
|
import { loadPatternListFromEnv } from "./vitest.pattern-file.ts";
|
|
import { createScopedVitestConfig } from "./vitest.scoped-config.ts";
|
|
|
|
export function loadIncludePatternsFromEnv(
|
|
env: Record<string, string | undefined> = process.env,
|
|
): string[] | null {
|
|
return loadPatternListFromEnv("OPENCLAW_VITEST_INCLUDE_FILE", env);
|
|
}
|
|
|
|
export function createExtensionAcpxVitestConfig(
|
|
env: Record<string, string | undefined> = process.env,
|
|
) {
|
|
return createScopedVitestConfig(
|
|
loadIncludePatternsFromEnv(env) ?? acpxExtensionTestRoots.map((root) => `${root}/**/*.test.ts`),
|
|
{
|
|
dir: "extensions",
|
|
env,
|
|
name: "extension-acpx",
|
|
passWithNoTests: true,
|
|
setupFiles: ["test/setup.extensions.ts"],
|
|
},
|
|
);
|
|
}
|
|
|
|
export default createExtensionAcpxVitestConfig();
|