mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-06 06:41:08 +00:00
21 lines
766 B
TypeScript
21 lines
766 B
TypeScript
import { coreChannelTestInclude } from "./vitest.channel-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 createChannelsVitestConfig(env?: Record<string, string | undefined>) {
|
|
return createScopedVitestConfig(loadIncludePatternsFromEnv(env) ?? coreChannelTestInclude, {
|
|
env,
|
|
exclude: ["src/gateway/**", "src/channels/plugins/contracts/**"],
|
|
name: "channels",
|
|
passWithNoTests: true,
|
|
});
|
|
}
|
|
|
|
export default createChannelsVitestConfig();
|