mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
test(fixtures): address review nits (drop dead param, exclude .mjs from budget scan)
This commit is contained in:
Vendored
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user