test(fixtures): address review nits (drop dead param, exclude .mjs from budget scan)

This commit is contained in:
SnapOtter
2026-06-19 20:44:35 +08:00
parent 427c543b72
commit 1aa3f8e48f
3 changed files with 6 additions and 7 deletions
+2 -2
View File
@@ -113,11 +113,11 @@ export function readFixture(path: string): Buffer {
// Recursively collect every string-valued leaf, EXCLUDING `*hostileEmpty*` groups
// (intentionally zero-byte) and function leaves (the `formats`/`tiny` accessors).
export function flattenFixturePaths(node: unknown, key = ""): string[] {
export function flattenFixturePaths(node: unknown): string[] {
if (typeof node === "string") return [node];
if (node && typeof node === "object") {
return Object.entries(node).flatMap(([k, v]) =>
k.toLowerCase().includes("hostileempty") ? [] : flattenFixturePaths(v, k),
k.toLowerCase().includes("hostileempty") ? [] : flattenFixturePaths(v),
);
}
return []; // functions (accessors) and other non-leaves