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

Function restartTestFile

lib/internal/test_runner/runner.js:614–627  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

612 opts.root.harness.watching = true;
613
614 async function restartTestFile(file) {
615 const runningProcess = runningProcesses.get(file);
616 if (runningProcess) {
617 runningProcess.kill();
618 await once(runningProcess, 'exit');
619 }
620 if (!runningSubtests.size) {
621 // Reset the topLevel counter
622 opts.root.harness.counters.topLevel = 0;
623 }
624
625 await runningSubtests.get(file);
626 runningSubtests.set(file, runTestFile(file, filesWatcher, opts));
627 }
628
629 // Watch for changes in current filtered files
630 const onChanged = ({ owners, eventType }) => {

Callers 1

onChangedFunction · 0.85

Calls 5

runTestFileFunction · 0.85
killMethod · 0.80
getMethod · 0.65
onceFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…