The command that should be executed to start the CLI process.
The arguments that should be passed.
Additional options.
Private
argsPrivate
childPrivate
commandPrivate
eventPrivate
optionsPrivate
outputPrivate
runningPrivate
startingRegister a callback to listen for output (stdout and stderr) from the process.
A callback that will be called when the process writes to stdout or stderr with the output as a string.
Execute the CLI process. Tip: You can call this method multiple times to restart the process, after the process has exited.
A promise that resolves when the process has been started.
If the process is already running or starting or if the command produces an error.
Update the options of the CLI test instance. The current options will be merged with the new options.
The options to change.
Wait for the process to write the given content to stdout or stderr. If the process exits before the content is found, the promise will be rejected. This method does not check past output, only output that is written after this method is called. For checking past output, use getOutput(). Per default this method is only able to find content that is written in a single chunk by the CLI process. If the content is split into multiple chunks set multipleChunks to true.
The string to wait for.
If true, the content can be split into multiple chunks. If false, the content must be written in a single chunk. Defaults to false.
A promise that resolves when the content is found, or rejects if the process exits before the content is found.
Generated using TypeDoc
Create a new CLI test instance. If you want to measure the code coverage of a JS/TS CLI, you may want to prepend the node command with 'c8' or 'nyc'.