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

Function generateCases

test/parallel/test-repl-user-error-handler.js:10–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const { spawn } = require('node:child_process');
9
10function* generateCases() {
11 for (const async of [false, true]) {
12 for (const handleErrorReturn of ['ignore', 'print', 'unhandled', 'badvalue']) {
13 if (handleErrorReturn === 'badvalue' && async) {
14 // Handled through a separate test using a child process
15 continue;
16 }
17 yield { async, handleErrorReturn };
18 }
19 }
20}
21
22for (const { async, handleErrorReturn } of generateCases()) {
23 test(`async: ${async}, handleErrorReturn: ${handleErrorReturn}`, async () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…