packages/ant-cli/spec/bin/ant.spec.js
async function _expectUsageInstructions(args) {
  const { stdout, stderr } = await exec(getAntCommand(args));
  expect(stdout).not.toBeNull();
  expect(stdout.split('\n')[0]).toEqual(
    'Usage: ant.js [--help] [--version] [--config <path>] [--verbose] <command>'
  );
  expect(stdout).toContain(
    `Usage: ant.js [--help] [--version] [--config <path>] [--verbose] <command>
[<args>] [<options>]`
  );
  expect(stdout).toContain(`Commands:
  ant.js create <service> [--template       Create a new service
  <template>]`);
  expect(stdout).toContain(
    '--help, -h     Show help                                             [boolean]'
  );
  expect(stdout).toContain(
    '--version      Show version number                                   [boolean]'
  );
  expect(stdout).toContain(
    '--config, -c   Path to YAML config file'
  );
  expect(stdout).toContain(
    '--verbose, -v  Show execution logs and error stacks [boolean] [default: false]'
  );
  expect(stdout).toContain(`Plugins:
  Core`);
  expect(stdout).toContain(
    'For more information, visit https://github.com/back4app/antframework'
  );
  expect(stderr).toEqual('');
}
async function _expectUsageInstructions(args) {
  const { stdout, stderr } = await exec(getAntCommand(args));
  expect(stdout).not.toBeNull();
  expect(stdout.split('\n')[0]).toEqual(
    'Usage: ant.js [--help] [--version] [--config <path>] [--verbose] <command>'
  );
  expect(stdout).toContain(
    `Usage: ant.js [--help] [--version] [--config <path>] [--verbose] <command>
[<args>] [<options>]`
  );
  expect(stdout).toContain(`Commands:
  ant.js create <service> [--template       Create a new service
  <template>]`);
  expect(stdout).toContain(
    '--help, -h     Show help                                             [boolean]'
  );
  expect(stdout).toContain(
    '--version      Show version number                                   [boolean]'
  );
  expect(stdout).toContain(
    '--config, -c   Path to YAML config file'
  );
  expect(stdout).toContain(
    '--verbose, -v  Show execution logs and error stacks [boolean] [default: false]'
  );
  expect(stdout).toContain(`Plugins:
  Core`);
  expect(stdout).toContain(
    'For more information, visit https://github.com/back4app/antframework'
  );
  expect(stderr).toEqual('');
}
async function _expectUsageInstructions ( args ) { const { stdout , stderr } = await exec ( getAntCommand ( args ) ) ; expect ( stdout ) . not . toBeNull ( ) ; expect ( stdout . split ( '\n' ) [ 0 ] ) . toEqual ( 'Usage: ant.js [--help] [--version] [--config <path>] [--verbose] <command>' ) ; expect ( stdout ) . toContain ( ` ` ) ; expect ( stdout ) . toContain ( ` ` ) ; expect ( stdout ) . toContain ( '--help, -h     Show help                                             [boolean]' ) ; expect ( stdout ) . toContain ( '--version      Show version number                                   [boolean]' ) ; expect ( stdout ) . toContain ( '--config, -c   Path to YAML config file' ) ; expect ( stdout ) . toContain ( '--verbose, -v  Show execution logs and error stacks [boolean] [default: false]' ) ; expect ( stdout ) . toContain ( ` ` ) ; expect ( stdout ) . toContain ( 'For more information, visit https://github.com/back4app/antframework' ) ; expect ( stderr ) . toEqual ( '' ) ; }
Helper function to run the CLI command with args and check the expected
usage instructions as an output.
@param {string} args The args to be sent to the CLI command.
@async
@private
Helper function to run the CLI command with args and check the expected usage instructions as an output .