<commit_before>'use strict';
var path = require('path');
var chalk = require('chalk');
var should = require('should');
var childProcess = require('child_process');
var stripAnsi = require('strip-ansi');

function getFixturePath(file) {
    return path.join('./tests/fixtures/', file);
}

function testCli(files, extraArgs, cb) {
    var args = files.map(getFixturePath).concat(extraArgs || []);

    var cp = childProcess.spawn('./bin/leasot.js', args, {
        cwd: path.resolve(__dirname, '..'),
        env: process.env,
        stdio: [process.stdin, 'pipe', 'pipe']
    });<commit_msg>Fix for childProcess.spawn on windows (#87)<commit_after>'use strict';
var path = require('path');
var chalk = require('chalk');
var should = require('should');
var childProcess = require('child_process');
var stripAnsi = require('strip-ansi');

function getFixturePath(file) {
    return path.join('./tests/fixtures/', file);
}

function testCli(files, extraArgs, cb) {
    var args = ['./bin/leasot.js'].concat(files.map(getFixturePath).concat(extraArgs || []));

    var cp = childProcess.spawn('node', args, {
        cwd: path.resolve(__dirname, '..'),
        env: process.env,
        stdio: [process.stdin, 'pipe', 'pipe']
    });
{'fraction_non_alphanumeric': 0.18307567127746135, 'fraction_numerical': 0.0016273393002441008, 'mean_word_length': 4.125, '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': '720264', 'n_tokens_mistral': 400, 'n_tokens_neox': 389, 'n_words': 87}