MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / waitForProcessExit

Function waitForProcessExit

tests/e2e/telemetry.test.ts:123–135  ·  view source on GitHub ↗
(
  pid: number,
  timeoutMs = 5000,
)

Source from the content-addressed store, hash-verified

121}
122
123async function waitForProcessExit(
124 pid: number,
125 timeoutMs = 5000,
126): Promise<void> {
127 const startTime = Date.now();
128 while (Date.now() - startTime < timeoutMs) {
129 if (!isProcessAlive(pid)) {
130 return;
131 }
132 await new Promise(resolve => setTimeout(resolve, 50));
133 }
134 throw new Error(`Timeout waiting for process ${pid} to exit`);
135}
136
137function cleanupTest(ctx: TestContext): void {
138 // Kill Main Process

Callers 1

runTelemetryTestFunction · 0.85

Calls 1

isProcessAliveFunction · 0.85

Tested by

no test coverage detected