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

Function runTests

scripts/test.js:210–237  ·  view source on GitHub ↗
(attempt)

Source from the content-addressed store, hash-verified

208 resolveDefaultChromePath(buildDir);
209
210async function runTests(attempt) {
211 if (attempt > 1) {
212 console.log(`\nRun attempt ${attempt}...\n`);
213 }
214 return await new Promise(resolve => {
215 const child = spawn(process.execPath, nodeArgs, {
216 cwd: projectRoot,
217 stdio: 'inherit',
218 env: {
219 ...process.env,
220 ...(defaultChromeExecutable
221 ? {PUPPETEER_EXECUTABLE_PATH: defaultChromeExecutable}
222 : {}),
223 CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS: 'true',
224 CHROME_DEVTOOLS_MCP_CRASH_ON_UNCAUGHT: 'true',
225 CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS: 'true',
226 CHROME_DEVTOOLS_MCP_NO_CONFIG_DISCOVERY: 'true',
227 ...(process.env['RUNNER_DEBUG'] === '1'
228 ? {NODE_DEBUG: 'puppeteer:*'}
229 : {}),
230 },
231 });
232
233 child.on('close', code => {
234 resolve(code);
235 });
236 });
237}
238
239const maxAttempts = shouldRetry ? 3 : 1;
240let exitCode = 1;

Callers 1

test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected