<commit_before>// Module dependencies
var debug = require('debug')('ruche:test:cli:atlernatives');
var expect = require('chai').expect;
var cli = require('../../lib/cli');
var fake = require('./util/fake');

/**
 * Test suite for cli:alternatives
 *
 * Compare the results of `cli.argv(command)` against expected scenarios. 
 */
describe('cli:alternatives', function () {
  
  it('alternatives package should produce `alternatives` context', function () {
    var argv = fake.argv('ruche alternatives package');
    var result = cli.argv(argv);
    expect(result.context).to.equal('alternatives');
  });

  it('With no package should produce `alternatives` help', function () {
    var argv = fake.argv('ruche alternatives');
    var result = cli.argv(argv);
    expect(result.context).to.equal('help');
    expect(result.help).to.equal('alternatives');
  });

  it('should be called with only one package', function () {
    var argv = fake.argv('ruche alternatives pack1 pack2');
    var result = cli.argv(argv);
    expect(result.context).to.equal('help');
    expect(result.help).to.equal('alternatives');
  });
  
});<commit_msg>Add test for the alternative --choice options<commit_after>// Module dependencies
var debug = require('debug')('ruche:test:cli:atlernatives');
var expect = require('chai').expect;
var cli = require('../../lib/cli');
var fake = require('./util/fake');

/**
 * Test suite for cli:alternatives
 *
 * Compare the results of `cli.argv(command)` against expected scenarios. 
 */
describe('cli:alternatives', function () {
  
  it('alternatives package should produce `alternatives` context', function () {
    var argv = fake.argv('ruche alternatives package');
    var result = cli.argv(argv);
    expect(result.context).to.equal('alternatives');
  });

  it('With no package should produce `alternatives` help', function () {
    var argv = fake.argv('ruche alternatives');
    var result = cli.argv(argv);
    expect(result.context).to.equal('help');
    expect(result.help).to.equal('alternatives');
  });

  it('should be called with only one package', function () {
    var argv = fake.argv('ruche alternatives pack1 pack2');
    var result = cli.argv(argv);
    expect(result.context).to.equal('help');
    expect(result.help).to.equal('alternatives');
  });

  it('could be called with --choice option', function () {
    var argv = fake.argv('ruche alternatives package --choice package-1-win32');
    var result = cli.argv(argv);
    expect(result.context).to.equal('alternatives');
    expect(result.package).to.equal('package');
    expect(result.choice).to.equal('package-1-win32');
  });
  
});
{'fraction_non_alphanumeric': 0.16995447647951442, 'fraction_numerical': 0.0037936267071320183, 'mean_word_length': 4.190944881889764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1845526', 'n_tokens_mistral': 781, 'n_tokens_neox': 765, 'n_words': 188}