test(FN-4719): ignore internal underscored lazy views in docs inventory
Fusion-Task-Id: FN-4719 Fusion-Task-Lineage: 53fb716e-2d3e-40c7-ad7a-e9f315f33c34
This commit is contained in:
committed by
gsxdsm
parent
b94eae4f23
commit
0dbfee07ed
@@ -55,7 +55,18 @@ function extractBacktickedNamesFromBullets(section: string): string[] {
|
|||||||
|
|
||||||
function extractAppLazyViews(appSource: string): Set<string> {
|
function extractAppLazyViews(appSource: string): Set<string> {
|
||||||
const matches = [...appSource.matchAll(/const\s+(\w+)\s*=\s*lazy\(/g)].map((m) => m[1]);
|
const matches = [...appSource.matchAll(/const\s+(\w+)\s*=\s*lazy\(/g)].map((m) => m[1]);
|
||||||
return new Set(matches.map((name) => (name === "_TodoView" ? "TodoView" : name)));
|
const normalized = matches
|
||||||
|
.map((name) => {
|
||||||
|
if (name === "_TodoView") {
|
||||||
|
return "TodoView";
|
||||||
|
}
|
||||||
|
if (name.startsWith("_")) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
})
|
||||||
|
.filter((name): name is string => Boolean(name));
|
||||||
|
return new Set(normalized);
|
||||||
}
|
}
|
||||||
|
|
||||||
describe("AGENTS lazy-loaded views inventory", () => {
|
describe("AGENTS lazy-loaded views inventory", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user