<commit_before>/* global describe, it, xit */
/* jslint node: true, esnext: true */

'use strict';

const chai = require('chai'),
  assert = chai.assert,
  expect = chai.expect,
  should = chai.should(),
  path = require('path'),
  child_process = require('child_process');

describe('cluster_node', function () {
  this.timeout(10000);

  it('simple start', done => {
    const child = child_process.spawn(
      path.join(__dirname, '../bin/kronos-cluster-node'), ['--trace', '--config', path.join(__dirname, '..',
        'config.json')], {
        cwd: path.join(__dirname, '..')
      }, (err, stdout, stderr) => {
        console.error(err);
        done();
      });

    child.stdout.on('data', data => {
      data = `${data}`;
      data = data.substring(0, data.length - 1);

      console.log(data);
      if (data.match(/running/) && data.match(/kronos/)) {
        done();
      }
    });
<commit_msg>test: adopt for new config location<commit_after>/* global describe, it, xit */
/* jslint node: true, esnext: true */

'use strict';

const chai = require('chai'),
  assert = chai.assert,
  expect = chai.expect,
  should = chai.should(),
  path = require('path'),
  child_process = require('child_process');

describe('cluster_node', function () {
  this.timeout(10000);

  it('simple start', done => {
    const child = child_process.spawn(
      path.join(__dirname, '../bin/kronos-cluster-node'), ['--trace', '--config', path.join(__dirname, '..',
        'config',
        'config.json')], {
        cwd: path.join(__dirname, '..')
      }, (err, stdout, stderr) => {
        console.error(err);
        done();
      });

    child.stdout.on('data', data => {
      data = `${data}`;
      data = data.substring(0, data.length - 1);

      console.log(data);
      if (data.match(/running/) && data.match(/kronos/)) {
        done();
      }
    });

{'fraction_non_alphanumeric': 0.20106951871657755, 'fraction_numerical': 0.0074866310160427805, 'mean_word_length': 2.633009708737864, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '770030', 'n_tokens_mistral': 632, 'n_tokens_neox': 617, 'n_words': 126}