<commit_before>

var exec = require('child_process').exec;
var execSync = require('child_process').execSync;

var path = require('path');

var bin = path.join(__dirname, './../bin/kebot');

test('argument miss', (done) => {
    exec(`node ${bin} task:args-miss -t`, (err, stdout)=>{
        expect(stdout.toString().split('\n').slice(1).join('')).toEqual('execute task');
        done();
    });
});

test('argument contain "args" in flag --args', () => {
    let command = execSync(`$(which node) ${bin} task:args  --args args -t`);

    expect(command.toString().split('\n').slice(1).join('')).toEqual('args');
});

test('argument environment in flag --env', () => {
    let command = execSync(`$(which node) ${bin} task:env  --env production -t`);
    expect(command.toString().split('\n').slice(1).join('')).toEqual('true');
});

test('arguments multiples flags "--email" and "--template"', () => {
    const command = execSync(`$(which node) ${bin} task:args-multiple  --email <EMAIL> --template register-action -t`);
    const expected = ['<EMAIL>', 'register-action'];

    expect(command.toString().split('\n').slice(1)).toEqual(expect.arrayContaining(expected));
});<commit_msg>test(kebot test): se remueve execSync y se cambio por exec<commit_after>

var exec = require('child_process').exec;
var execSync = require('child_process').execSync;

var path = require('path');

var bin = path.join(__dirname, './../bin/kebot');

test('argument miss', (done) => {
    exec(`$(which node) ${bin} task:args-miss -t`, (err, stdout)=>{
        expect(stdout.split('\n').slice(1).join('')).toEqual('execute task');
        done();
    });
});

test('argument contain "args" in flag --args', (done) => {
    exec(`$(which node) ${bin} task:args  --args args -t`, (err,stdout)=>{
        expect(stdout.split('\n').slice(1).join('')).toEqual('args');
        done();
    });
});

test('argument environment in flag --env', (done) => {
    exec(`$(which node) ${bin} task:env  --env production -t`, (err, stdout)=>{
        expect(stdout.split('\n').slice(1).join('')).toEqual('true');
        done();
    });
});

test('arguments multiples flags "--email" and "--template"', (done) => {
    exec(`$(which node) ${bin} task:args-multiple  --email <EMAIL> --template register-action -t`, (err, stdout)=>{
        const expected = ['<EMAIL>', 'register-action'];
        expect(stdout.split('\n').slice(1)).toEqual(expect.arrayContaining(expected));
        done();
    });
});
{'fraction_non_alphanumeric': 0.2388663967611336, 'fraction_numerical': 0.0032388663967611335, 'mean_word_length': 3.893069306930693, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 20, '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': '2813126', 'n_tokens_mistral': 771, 'n_tokens_neox': 790, 'n_words': 173}