MCPcopy Create free account
hub / github.com/clawbot7/cli-gateway / listTestFiles

Function listTestFiles

scripts/run-tests.mjs:27–46  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

25process.exit(res.status ?? 1);
26
27function listTestFiles(dir) {
28 /** @type {string[]} */
29 const out = [];
30
31 for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
32 const full = path.join(dir, entry.name);
33 if (entry.isDirectory()) {
34 out.push(...listTestFiles(full));
35 continue;
36 }
37
38 if (entry.isFile() && entry.name.endsWith('.test.ts')) {
39 out.push(full);
40 }
41 }
42
43 // Deterministic order.
44 out.sort();
45 return out;
46}

Callers 1

run-tests.mjsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected