From 23772bb785731126d723fe1d82cf662ba625ab6c Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 28 Mar 2026 13:49:16 +0000 Subject: [PATCH] test: exclude topology fixtures from vitest collection --- test/scripts/ts-topology.test.ts | 6 +++--- test/vitest-config.test.ts | 8 +++++++- vitest.config.ts | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/test/scripts/ts-topology.test.ts b/test/scripts/ts-topology.test.ts index 8d08f117baf..7b698b673a6 100644 --- a/test/scripts/ts-topology.test.ts +++ b/test/scripts/ts-topology.test.ts @@ -31,8 +31,8 @@ describe("ts-topology", () => { declarationPath: "src/lib/shared.ts", declarationLine: 1, productionExtensions: ["alpha", "beta"], - productionPackages: ["package:core", "src"], - productionOwners: ["extension:alpha", "extension:beta", "package:core", "src"], + productionPackages: ["src"], + productionOwners: ["extension:alpha", "extension:beta", "src"], }); expect(sharedThing?.publicSpecifiers).toEqual(["fixture-sdk", "fixture-sdk/extra"]); }); @@ -146,7 +146,7 @@ describe("ts-topology", () => { Records with consumers: 5 Top 2 consumer-topology records: - - fixture-sdk:sharedThing prod=4 test=0 internal=0 + - fixture-sdk:sharedThing prod=3 test=0 internal=0 - fixture-sdk:SharedType prod=2 test=0 internal=0 " `); diff --git a/test/vitest-config.test.ts b/test/vitest-config.test.ts index 62b1cc088a4..51472a818e0 100644 --- a/test/vitest-config.test.ts +++ b/test/vitest-config.test.ts @@ -3,7 +3,7 @@ import { resolveExecutionBudget, resolveRuntimeCapabilities, } from "../scripts/test-planner/runtime-profile.mjs"; -import { resolveLocalVitestMaxWorkers } from "../vitest.config.ts"; +import baseConfig, { resolveLocalVitestMaxWorkers } from "../vitest.config.ts"; function resolveHighMemoryLocalRuntime() { return resolveRuntimeCapabilities( @@ -191,3 +191,9 @@ describe("resolveLocalVitestMaxWorkers", () => { expect(budget.extensionWorkers).toBe(5); }); }); + +describe("base vitest config", () => { + it("excludes fixture trees from test collection", () => { + expect(baseConfig.test?.exclude).toContain("test/fixtures/**"); + }); +}); diff --git a/vitest.config.ts b/vitest.config.ts index 572cb5bc057..c3a6cd6fc62 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -92,6 +92,7 @@ export default defineConfig({ setupFiles: ["test/setup.ts"], exclude: [ "dist/**", + "test/fixtures/**", "apps/macos/**", "apps/macos/.build/**", "**/node_modules/**",