- Source:
Methods
-
<static> getService(name)
-
getService - Given a childService name returns the childService object.
Parameters:
Name Type Description namestring - Source:
Returns:
childService
- Type
- Object
-
<static> initialize()
-
initialize - Initializes the childService using the serviceControl module
Typically called at the top of cucumber support file that uses the childService using the
cucumber context that containsBefore,After,Given, etc.
Usage:childService.initialize.call(this);
- Source:
Returns:
- Type
- undefined
-
<static> spawn( [spawnArgs])
-
spawn - Launches a Node child process from a shell command via
require('child_process').spawn(...)The
spawnArgsparameter allows these options:name: stringThe name of the cukelib service (required).cmd: stringSpawn command argument (required).args: [string]Spawn args argumentoptions: ObjectchildProcess.spawn options argument (env, cwd, etc.)isReadyMatch: string|RegExpdefault:/./Pattern that is matched from stdout or stderr to indicate the child process is ready.isReady: (proc: childProcess) => Promisethe promise is resolved when the child process is ready. The default is to resolve when data from stdout or stderr matches theisReadyMatchpattern.stderrHandler: Function(data: string)default is to print viaconsole.error(chalk.magenta(...))stdoutHandler: Function(data: string)default is to print viaconsole.log(chalk.magenta(...)). Assign the function(data) => nullfor a "quiet" output.errorHandler: Function(err: Error)default is to print the err viaconsole.error(chalk.magenta(...))
Parameters:
Name Type Argument Default Description spawnArgsObject <optional>
{} see above
- Source:
Returns:
launchService promise
- Type
- Promise