diff --git a/vitest.extensions.config.ts b/vitest.extensions.config.ts index 71c4dad761a..d63c83bf27b 100644 --- a/vitest.extensions.config.ts +++ b/vitest.extensions.config.ts @@ -25,6 +25,7 @@ export default createScopedVitestConfig( { dir: "extensions", pool: "threads", + passWithNoTests: true, // Channel implementations live under extensions/ but are tested by // vitest.channels.config.ts (pnpm test:channels) which provides // the heavier mock scaffolding they need. diff --git a/vitest.scoped-config.ts b/vitest.scoped-config.ts index f15afe2863f..1aed3cfe74a 100644 --- a/vitest.scoped-config.ts +++ b/vitest.scoped-config.ts @@ -13,12 +13,25 @@ export function resolveVitestIsolation( export function createScopedVitestConfig( include: string[], - options?: { dir?: string; exclude?: string[]; pool?: "threads" | "forks" }, + options?: { + dir?: string; + exclude?: string[]; + pool?: "threads" | "forks"; + passWithNoTests?: boolean; + }, ) { const base = baseConfig as unknown as Record; const baseTest = - (baseConfig as { test?: { dir?: string; exclude?: string[]; pool?: "threads" | "forks" } }) - .test ?? {}; + ( + baseConfig as { + test?: { + dir?: string; + exclude?: string[]; + pool?: "threads" | "forks"; + passWithNoTests?: boolean; + }; + } + ).test ?? {}; const exclude = [...(baseTest.exclude ?? []), ...(options?.exclude ?? [])]; return defineConfig({ @@ -30,6 +43,9 @@ export function createScopedVitestConfig( include, exclude, ...(options?.pool ? { pool: options.pool } : {}), + ...(options?.passWithNoTests !== undefined + ? { passWithNoTests: options.passWithNoTests } + : {}), }, }); }