MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / collectTests

Function collectTests

dashboard/run-unit-tests.mjs:9–23  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

7const testRoot = join(root, "test");
8
9function collectTests(dir) {
10 const out = [];
11 for (const entry of readdirSync(dir)) {
12 const full = join(dir, entry);
13 const stat = statSync(full);
14 if (stat.isDirectory()) {
15 out.push(...collectTests(full));
16 continue;
17 }
18 if (entry.endsWith(".test.mjs")) {
19 out.push(relative(root, full));
20 }
21 }
22 return out.sort();
23}
24
25const tests = collectTests(testRoot);
26if (!tests.length) {

Callers 1

run-unit-tests.mjsFile · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected