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

Function runTests

test/parallel/test-runner-run-files-undefined.mjs:5–23  ·  view source on GitHub ↗
(run, reporters)

Source from the content-addressed store, hash-verified

3import { spawnSyncAndExitWithoutError } from '../common/child_process.js';
4
5async function runTests(run, reporters) {
6 for (const reporterName of Object.keys(reporters)) {
7 if (reporterName === 'default') continue;
8 console.log({ reporterName });
9
10 const stream = run({
11 files: undefined
12 }).compose(reporters[reporterName]);
13 stream.on('test:fail', () => {
14 throw new Error('Received test:fail with ' + reporterName);
15 });
16 stream.on('test:pass', () => {
17 throw new Error('Received test:pass with ' + reporterName);
18 });
19
20 // eslint-disable-next-line no-unused-vars
21 for await (const _ of stream);
22 }
23}
24
25tmpdir.refresh();
26spawnSyncAndExitWithoutError(process.execPath, ['--input-type=module', '-e', `

Callers

nothing calls this directly

Calls 5

runFunction · 0.70
keysMethod · 0.65
logMethod · 0.45
composeMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…