<commit_before>const assert = require('assert');
const { exec } = require('child_process');
const path = require('path');
const cli = require('../lib');

describe('@feathersjs/cli', () => {
  it('is CommonJS compatible', () => {
    assert.equal(typeof require('../lib'), 'function');
  });

  it('basic functionality', () => {
    assert.equal(typeof cli, 'function', 'It worked');
  });

  it('runs the program with `generate` argument', done => {
    exec(`node ${path.join(__dirname, '../bin/feathers.js')} generate`, (err, stdout, stderr) => {
      assert.equal(err, null);
      assert.equal(stderr, '');
      assert.equal(stdout, '\n  Usage: feathers generate [type]\n\n\n' +
        '  Options:\n\n' +
        '    -V, --version  output the version number\n' +
        '    -h, --help     output usage information\n\n\n' +
        '  Commands:\n\n' +
        '    generate|g [type]  Run a generator. Type can be\n' +
        '    \t• app - Create a new Feathers application in the current folder\n' +
        '    \t• authentication - Set up authentication for the current application\n' +
        '    \t• connection - Initialize a new database connection\n' +
        '    \t• hook - Create a new hook\n' +<commit_msg>cli: try to fix test on travis by increasing timeout<commit_after>const assert = require('assert');
const { exec } = require('child_process');
const path = require('path');
const cli = require('../lib');

describe('@feathersjs/cli', () => {
  it('is CommonJS compatible', () => {
    assert.equal(typeof require('../lib'), 'function');
  });

  it('basic functionality', () => {
    assert.equal(typeof cli, 'function', 'It worked');
  });

  it('runs the program with `generate` argument', function (done) {
    this.timeout(5000);

    exec(`node ${path.join(__dirname, '../bin/feathers.js')} generate`, (err, stdout, stderr) => {
      assert.equal(err, null);
      assert.equal(stderr, '');
      assert.equal(stdout, '\n  Usage: feathers generate [type]\n\n\n' +
        '  Options:\n\n' +
        '    -V, --version  output the version number\n' +
        '    -h, --help     output usage information\n\n\n' +
        '  Commands:\n\n' +
        '    generate|g [type]  Run a generator. Type can be\n' +
        '    \t• app - Create a new Feathers application in the current folder\n' +
        '    \t• authentication - Set up authentication for the current application\n' +
        '    \t• connection - Initialize a new database connection\n' +
        '    \t• hook - Create a new hook\n' +
{'fraction_non_alphanumeric': 0.1725908372827804, 'fraction_numerical': 0.001579778830963665, 'mean_word_length': 2.6134094151212555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7534425', 'n_tokens_mistral': 790, 'n_tokens_neox': 781, 'n_words': 217}