MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / launch

Function launch

javascript/selenium-manager/test/index_test.js:136–143  ·  view source on GitHub ↗
(managerPath, args, env = {})

Source from the content-addressed store, hash-verified

134// Points SE_MANAGER_PATH at node itself, so the arguments decide what the
135// "manager" does and the launcher is exercised without a real binary.
136function launch(managerPath, args, env = {}) {
137 const childEnv = { ...process.env, SE_MANAGER_PATH: managerPath, ...env }
138 if (!('SE_AVOID_STATS' in env)) {
139 delete childEnv.SE_AVOID_STATS
140 }
141 const result = spawnSync(process.execPath, [LAUNCHER, ...args], { encoding: 'utf8', env: childEnv })
142 return { stdout: result.stdout, error: result.stderr, status: result.status }
143}
144
145test('the launcher passes through the manager exit code', () => {
146 const result = launch(process.execPath, ['-e', 'process.exit(3)'])

Callers 1

index_test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected