MCPcopy Create free account
hub / github.com/block/buzz / walk

Function walk

desktop/src/shared/api/relayWebSocketClose.test.mjs:44–59  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

42 const offenders = [];
43
44 const walk = (dir) => {
45 for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
46 const full = path.join(dir, entry.name);
47 if (entry.isDirectory()) {
48 walk(full);
49 continue;
50 }
51 if (!/\.(ts|tsx|js|jsx|mjs)$/.test(entry.name)) continue;
52 if (full === fileURLToPath(import.meta.url)) continue;
53 if (
54 fs.readFileSync(full, "utf8").includes("plugin:websocket|disconnect")
55 ) {
56 offenders.push(path.relative(srcRoot, full));
57 }
58 }
59 };
60 walk(srcRoot);
61
62 assert.deepEqual(

Callers 1

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected