MCPcopy
hub / github.com/parse-community/parse-server / waitForStartup

Function waitForStartup

spec/CLI.spec.js:217–228  ·  view source on GitHub ↗
(cp, requiredOutput)

Source from the content-addressed store, hash-verified

215 let childProcess;
216
217 function waitForStartup(cp, requiredOutput) {
218 return new Promise((resolve, reject) => {
219 const aggregated = [];
220 cp.stdout.on('data', data => {
221 aggregated.push(data.toString());
222 if (requiredOutput.every(r => aggregated.some(a => a.includes(r)))) {
223 resolve();
224 }
225 });
226 cp.on('error', reject);
227 });
228 }
229
230 afterEach(done => {
231 if (childProcess) {

Callers 1

CLI.spec.jsFile · 0.85

Calls 2

toStringMethod · 0.80
resolveFunction · 0.50

Tested by

no test coverage detected