(scriptPath: string, url: string, logger: Logger)
| 40 | } |
| 41 | |
| 42 | function executeNodeScript(scriptPath: string, url: string, logger: Logger) { |
| 43 | const extraArgs = process.argv.slice(2) |
| 44 | const child = spawn(process.execPath, [scriptPath, ...extraArgs, url], { |
| 45 | stdio: 'inherit', |
| 46 | }) |
| 47 | child.on('close', (code) => { |
| 48 | if (code !== 0) { |
| 49 | logger.error( |
| 50 | colors.red( |
| 51 | `\nThe script specified as BROWSER environment variable failed.\n\n${colors.cyan( |
| 52 | scriptPath, |
| 53 | )} exited with code ${code}.`, |
| 54 | ), |
| 55 | { error: null }, |
| 56 | ) |
| 57 | } |
| 58 | }) |
| 59 | } |
| 60 | |
| 61 | const supportedChromiumBrowsers = [ |
| 62 | 'Google Chrome Canary', |
no test coverage detected