MCPcopy
hub / github.com/vercel/next.js / handleStderr

Function handleStderr

test/lib/next-test-utils.ts:98–109  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

96 }
97
98 function handleStderr(data) {
99 const message = data.toString()
100 if (failRegexp && failRegexp.test(message)) {
101 instance.kill()
102 return reject(new Error('received failRegexp'))
103 }
104 process.stderr.write(message)
105
106 if (opts && opts.onStderr) {
107 opts.onStderr(message.toString())
108 }
109 }
110
111 if (opts?.shouldRejectOnError) {
112 instance.on('exit', (code) => {

Callers

nothing calls this directly

Calls 5

testMethod · 0.65
killMethod · 0.65
rejectFunction · 0.50
toStringMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected