• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const { test } = require('tap');
3
4const startCLI = require('./start-cli');
5
6test('examples/empty.js', (t) => {
7  const cli = startCLI(['examples/empty.js']);
8
9  function onFatal(error) {
10    cli.quit();
11    throw error;
12  }
13
14  return cli.waitForInitialBreak()
15    .then(() => cli.waitForPrompt())
16    .then(() => cli.command('help'))
17    .then(() => {
18      t.match(cli.output, /run, restart, r\s+/m);
19    })
20    .then(() => cli.quit())
21    .then(null, onFatal);
22});
23