


























@@ -81,6 +81,10 @@ function bundledExcludePatternCouldMatchFile(pattern: string, file: string): boo
8181return false;
8282}
838384+function matchingExcludePatterns(patterns: string[], file: string): string[] {
85+return patterns.filter((pattern) => path.matchesGlob(file, pattern));
86+}
87+8488describe("resolveVitestIsolation", () => {
8589it("aliases private QA plugin SDK subpaths for source tests only", () => {
8690expect(sharedVitestConfig.resolve.alias).toEqual(
@@ -632,16 +636,12 @@ describe("scoped vitest configs", () => {
632636633637it("keeps acpx tests out of the shared extensions lane", () => {
634638const extensionExcludes = defaultExtensionsConfig.test?.exclude ?? [];
635-expect(
636-extensionExcludes.some((pattern) => path.matchesGlob("acpx/src/runtime.test.ts", pattern)),
637-).toBe(true);
639+expect(matchingExcludePatterns(extensionExcludes, "acpx/src/runtime.test.ts")).not.toEqual([]);
638640});
639641640642it("keeps diffs tests out of the shared extensions lane", () => {
641643const extensionExcludes = defaultExtensionsConfig.test?.exclude ?? [];
642-expect(
643-extensionExcludes.some((pattern) => path.matchesGlob("diffs/src/render.test.ts", pattern)),
644-).toBe(true);
644+expect(matchingExcludePatterns(extensionExcludes, "diffs/src/render.test.ts")).not.toEqual([]);
645645});
646646647647it("keeps broad dedicated extension groups out of the shared extensions lane", () => {
@@ -656,7 +656,7 @@ describe("scoped vitest configs", () => {
656656"firecrawl/src/index.test.ts",
657657"qa-lab/src/index.test.ts",
658658]) {
659-expect(extensionExcludes.some((pattern) => path.matchesGlob(file, pattern))).toBe(true);
659+expect(matchingExcludePatterns(extensionExcludes, file)).not.toEqual([]);
660660}
661661});
662662此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。