Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/check-branding-drift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const BRANDING_DRIFT_PATHSPECS = [
"packages/*/lib/**/*.js",
"packages/*/lib/**/*.ts",
"packages/*/src/**/*.ts",
"packages/*/src/**/*.tsx",
"packages/*/scripts/**/*.mjs",
"apps/*/src/**/*.ts",
"apps/*/src/**/*.tsx",
Expand Down
18 changes: 18 additions & 0 deletions test/unit/check-branding-drift-script.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,24 @@ describe("scanBrandingHits", () => {
expect(capturedArgs).toContain("apps/*/scripts/**/*.mjs");
});

it("scans packages/*/src/**/*.tsx, so ui-kit design-system components are covered like apps/* .tsx are", () => {
let capturedArgs: string[] = [];
const exec = (_root: string, args: string[]) => {
capturedArgs = args;
return "";
};
scanBrandingHits({ root: "/fake", exec });

expect(capturedArgs).toContain("packages/*/src/**/*.tsx");
});

it("includes a packages/*/src/*.tsx hit in the scanned set (a ui-kit component now in scope)", () => {
const exec = () => "packages/loopover-ui-kit/src/card.tsx:1\n";
const result = scanBrandingHits({ root: "/fake", exec });

expect(result).toEqual({ "packages/loopover-ui-kit/src/card.tsx": 1 });
});

// Real regression guard, mirroring check-manifest-drift-script.test.ts's own real-repo-state test: proves
// the actual defaultExec (real `git grep` subprocess, real exit-1-means-empty handling) works against this
// repo's real tracked files, not just the injected fake above.
Expand Down