MCPcopy Index your code
hub / github.com/nodejs/node / findRunningTests

Function findRunningTests

lib/internal/test_runner/harness.js:295–313  ·  view source on GitHub ↗
(test, running = [])

Source from the content-addressed store, hash-verified

293 };
294
295 const findRunningTests = (test, running = []) => {
296 if (test.startTime !== null && !test.finished) {
297 for (let i = 0; i < test.subtests.length; i++) {
298 findRunningTests(test.subtests[i], running);
299 }
300 // Only add leaf tests (innermost running tests)
301 if (test.activeSubtests === 0 && test.name !== '<root>') {
302 ArrayPrototypePush(running, {
303 __proto__: null,
304 name: test.name,
305 nesting: test.nesting,
306 file: test.loc?.file,
307 line: test.loc?.line,
308 column: test.loc?.column,
309 });
310 }
311 }
312 return running;
313 };
314
315 const terminationHandler = async () => {
316 const runningTests = findRunningTests(root);

Callers 1

terminationHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected