MCPcopy Create free account
hub / github.com/webpack/webpack-cli / writeAnswer

Function writeAnswer

test/utils/test-utils.js:156–171  ·  view source on GitHub ↗
(output)

Source from the content-addressed store, hash-verified

154 let waitAnswer = true;
155
156 const writeAnswer = (output) => {
157 if (answers.length === 0) {
158 proc.stdin.write(output);
159 processKill(proc);
160
161 return;
162 }
163
164 if (currentAnswer < answers.length) {
165 const answer = answers[currentAnswer];
166
167 proc.stdin.write(answer);
168 waitAnswer = true;
169 currentAnswer++;
170 }
171 };
172
173 // Uncomment for debugging
174 // proc.stderr.pipe(process.stdout);

Callers 1

writeFunction · 0.85

Calls 1

processKillFunction · 0.85

Tested by

no test coverage detected