fix(server): exclude nested test utilities from builds

This commit is contained in:
Mohamed Boudra
2026-07-28 17:52:37 +02:00
parent 93866a8c4f
commit 11973905c9
2 changed files with 8 additions and 1 deletions

View File

@@ -26,7 +26,7 @@
"exclude": [
"node_modules",
"dist",
"src/server/test-utils/**",
"src/server/**/test-utils/**",
"src/server/daemon-e2e/**",
"src/server/**/*.e2e.ts",
"src/server/**/*.e2e.tsx",

View File

@@ -8,6 +8,7 @@ const ciWorkflowPath = new URL(".github/workflows/ci.yml", repoRoot);
const dockerWorkflowPath = new URL(".github/workflows/docker.yml", repoRoot);
const nixWorkflowPath = new URL(".github/workflows/nix.yml", repoRoot);
const filtersPath = new URL(".github/ci-paths.yml", repoRoot);
const serverTsconfigPath = new URL("packages/server/tsconfig.server.json", repoRoot);
const gatedCiJobs = new Map([
["format", { name: "format", contract: "format" }],
@@ -130,6 +131,12 @@ test("focused contracts stay inside existing required checks", () => {
assert.ok(!jobs.has("desktop-browser-bridge"));
});
test("server builds exclude test utilities at every domain depth", () => {
const tsconfig = JSON.parse(readFileSync(serverTsconfigPath, "utf8"));
assert.ok(tsconfig.exclude.includes("src/server/**/test-utils/**"));
assert.ok(!tsconfig.exclude.includes("src/server/test-utils/**"));
});
test("PR routing follows test contracts instead of package consumers", () => {
const filters = loadFilters(filtersPath);
const cases = new Map([