0.4.0 • Published 7 years ago
cli-agent v0.4.0
cli-agent
Setup
npm install cli-agent --save-dev
Using
// @see tests
const interaction = new CLIAgent(/* path to program */);
let year;
const result = await interaction.wait(/hello/i)
.wait(/question/i)
.send('2014\n')
.wait(/year is (\d+)/, (matches) => {
year = matches[1];
})
.start();