Files
openclaw/vitest.bundled.config.ts
Bob f6124f3e17 ACP: harden Discord recovery and reset flow (#62132)
* ACP: harden Discord recovery and reset flow

* CI: harden bundled vitest excludes

* ACP: fix Claude launch and reset recovery

* Discord: use follow-up replies after slash defer

* ACP: route bound resets through gateway service

* ACP: unify bound reset authority

* ACPX: update OpenClaw branch to 0.5.2

* ACP: fix rebuilt branch replay fallout

* ACP: fix CI regressions after ACPX 0.5.2 update

---------

Co-authored-by: Onur <2453968+osolmaz@users.noreply.github.com>
2026-04-07 12:23:50 +02:00

37 lines
1.2 KiB
TypeScript

import path from "node:path";
import {
bundledPluginDependentUnitTestFiles,
unitTestAdditionalExcludePatterns,
} from "./vitest.unit-paths.mjs";
import { createUnitVitestConfigWithOptions } from "./vitest.unit.config.ts";
function normalizeGlobCandidate(value: string): string {
return value.split(path.sep).join("/");
}
function excludePatternCouldMatchFile(pattern: string, file: string): boolean {
const normalizedPattern = normalizeGlobCandidate(pattern);
const normalizedFile = normalizeGlobCandidate(file);
if (normalizedPattern === normalizedFile) {
return true;
}
if (normalizedPattern.endsWith("/**")) {
const prefix = normalizedPattern.slice(0, -3);
return normalizedFile === prefix || normalizedFile.startsWith(`${prefix}/`);
}
return path.matchesGlob(normalizedFile, normalizedPattern);
}
const bundledUnitExcludePatterns = unitTestAdditionalExcludePatterns.filter(
(pattern) =>
!bundledPluginDependentUnitTestFiles.some((file) =>
excludePatternCouldMatchFile(pattern, file),
),
);
export default createUnitVitestConfigWithOptions(process.env, {
includePatterns: bundledPluginDependentUnitTestFiles,
extraExcludePatterns: bundledUnitExcludePatterns,
name: "bundled",
});