From 2e6ebea47615f44a497b99215c497de1b33ad6cc Mon Sep 17 00:00:00 2001 From: JSONbored <49853598+JSONbored@users.noreply.github.com> Date: Fri, 24 Jul 2026 15:11:50 -0700 Subject: [PATCH] test(engine): consolidate focus-manifest engine bolt-ons into one file (#8577) focus-manifest-engine-barrel.test.ts (a single re-export-identity check) and focus-manifest-engine-branch-coverage.test.ts (a #2280 Codecov bolt-on) both tested packages/loopover-engine/src/focus-manifest.ts from two disconnected tiny files. Merge into focus-manifest-engine.test.ts, keeping every case verbatim (a pure relocation, no case dropped or retitled logic-wise). Verified zero coverage regression on the module: branch/line coverage with {loader, validation, engine-merged} is identical to {loader, validation, barrel, branch-coverage} -- 869/1729 branches (50.26%), 727/1334 lines (54.49%) in both cases. --- .../unit/focus-manifest-engine-barrel.test.ts | 24 ------------------- ....test.ts => focus-manifest-engine.test.ts} | 18 ++++++++++++++ 2 files changed, 18 insertions(+), 24 deletions(-) delete mode 100644 test/unit/focus-manifest-engine-barrel.test.ts rename test/unit/{focus-manifest-engine-branch-coverage.test.ts => focus-manifest-engine.test.ts} (83%) diff --git a/test/unit/focus-manifest-engine-barrel.test.ts b/test/unit/focus-manifest-engine-barrel.test.ts deleted file mode 100644 index ab2a578b58..0000000000 --- a/test/unit/focus-manifest-engine-barrel.test.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { describe, expect, it } from "vitest"; - -import { - compileFocusManifestPolicy, - matchesManifestPath, - parseFocusManifest, - parseFocusManifestContent, -} from "../../packages/loopover-engine/src/focus-manifest"; - -describe("loopover-engine focus-manifest barrel exports (#2280)", () => { - it("re-exports the focus-manifest parse/compile API from the package barrel", async () => { - const barrel = await import("../../packages/loopover-engine/src/index"); - expect(typeof barrel.parseFocusManifest).toBe("function"); - expect(typeof barrel.parseFocusManifestContent).toBe("function"); - expect(typeof barrel.compileFocusManifestPolicy).toBe("function"); - expect(typeof barrel.matchesManifestPath).toBe("function"); - expect(typeof barrel.isFocusManifestPublicSafe).toBe("function"); - expect(barrel.MAX_FOCUS_MANIFEST_BYTES).toBeGreaterThan(0); - expect(typeof barrel.parseFocusManifest).toBe(typeof parseFocusManifest); - expect(typeof barrel.parseFocusManifestContent).toBe(typeof parseFocusManifestContent); - expect(typeof barrel.compileFocusManifestPolicy).toBe(typeof compileFocusManifestPolicy); - expect(typeof barrel.matchesManifestPath).toBe(typeof matchesManifestPath); - }); -}); diff --git a/test/unit/focus-manifest-engine-branch-coverage.test.ts b/test/unit/focus-manifest-engine.test.ts similarity index 83% rename from test/unit/focus-manifest-engine-branch-coverage.test.ts rename to test/unit/focus-manifest-engine.test.ts index 50f788663d..5634210164 100644 --- a/test/unit/focus-manifest-engine-branch-coverage.test.ts +++ b/test/unit/focus-manifest-engine.test.ts @@ -1,13 +1,31 @@ import { describe, expect, it } from "vitest"; import { + compileFocusManifestPolicy, gateConfigToJson, + matchesManifestPath, MAX_FOCUS_MANIFEST_BYTES, parseFocusManifest, parseFocusManifestContent, reviewConfigToJson, } from "../../packages/loopover-engine/src/focus-manifest"; +describe("loopover-engine focus-manifest barrel exports (#2280)", () => { + it("re-exports the focus-manifest parse/compile API from the package barrel", async () => { + const barrel = await import("../../packages/loopover-engine/src/index"); + expect(typeof barrel.parseFocusManifest).toBe("function"); + expect(typeof barrel.parseFocusManifestContent).toBe("function"); + expect(typeof barrel.compileFocusManifestPolicy).toBe("function"); + expect(typeof barrel.matchesManifestPath).toBe("function"); + expect(typeof barrel.isFocusManifestPublicSafe).toBe("function"); + expect(barrel.MAX_FOCUS_MANIFEST_BYTES).toBeGreaterThan(0); + expect(typeof barrel.parseFocusManifest).toBe(typeof parseFocusManifest); + expect(typeof barrel.parseFocusManifestContent).toBe(typeof parseFocusManifestContent); + expect(typeof barrel.compileFocusManifestPolicy).toBe(typeof compileFocusManifestPolicy); + expect(typeof barrel.matchesManifestPath).toBe(typeof matchesManifestPath); + }); +}); + describe("focus-manifest engine branch coverage (#2280)", () => { it("warns when settings.linkedIssueHardRules is not an object", () => { const parsed = parseFocusManifest({ settings: { linkedIssueHardRules: "not-an-object" } });