mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
Refactor the Control UI around route-owned page lifecycle and state while preserving existing behavior and design. Prepared head SHA: bd51b6fa76ec057fde19bc31f93fb4aad70416d3 Co-authored-by: Shakker <165377636+shakkernerd@users.noreply.github.com> Reviewed-by: @shakkernerd
24 lines
851 B
TypeScript
24 lines
851 B
TypeScript
// Vitest ui config wires the ui test shard.
|
|
import { createScopedVitestConfig } from "./vitest.scoped-config.ts";
|
|
import { jsdomOptimizedDeps } from "./vitest.shared.config.ts";
|
|
|
|
export function createUiVitestConfig(
|
|
env?: Record<string, string | undefined>,
|
|
options?: { includePatterns?: string[]; name?: string },
|
|
) {
|
|
const includePatterns = options?.includePatterns ?? ["ui/src/**/*.test.ts"];
|
|
const exclude = options?.includePatterns ? [] : ["ui/src/**/*.e2e.test.ts"];
|
|
return createScopedVitestConfig(includePatterns, {
|
|
deps: jsdomOptimizedDeps,
|
|
environment: "jsdom",
|
|
env,
|
|
exclude,
|
|
excludeUnitFastTests: false,
|
|
includeOpenClawRuntimeSetup: false,
|
|
isolate: false,
|
|
name: options?.name ?? "ui",
|
|
setupFiles: ["ui/src/test-helpers/lit-warnings.setup.ts"],
|
|
});
|
|
}
|
|
|
|
export default createUiVitestConfig();
|