<commit_before>'use strict';
/* eslint-env mocha */
const assert = require('assert');
const execFile = require('child_process').execFile;
const path = require('path');
const ejslint = path.resolve('cli.js');

suite('cli', () => {
  test('valid input', done => {
    execFile(ejslint, ['test/fixtures/valid.ejs'], (err, stdout, stderr) => {
      assert.ifError(err);
      assert.ifError(stderr);
      done();
    });
  });
  test('invalid input', done => {
    execFile(ejslint, ['test/fixtures/invalid.ejs'], (err, stdout, stderr) => {
      assert.equal(err.code, 1, 'expected exit code of 1');
      assert.equal(stderr.trim(), 'Unexpected token (3:4) in test/fixtures/invalid.ejs');
      done();
    });
  });
});<commit_msg>Fix tests on Node 10<commit_after>'use strict';
/* eslint-env mocha */
const assert = require('assert');
const execFile = require('child_process').execFile;
const path = require('path');
const ejslint = path.resolve('cli.js');

suite('cli', () => {
  test('valid input', done => {
    execFile(ejslint, ['test/fixtures/valid.ejs'], (err, stdout, stderr) => {
      assert.ifError(err);
      assert(!stderr);
      done();
    });
  });
  test('invalid input', done => {
    execFile(ejslint, ['test/fixtures/invalid.ejs'], (err, stdout, stderr) => {
      assert.equal(err.code, 1, 'expected exit code of 1');
      assert.equal(stderr.trim(), 'Unexpected token (3:4) in test/fixtures/invalid.ejs');
      done();
    });
  });
});
{'fraction_non_alphanumeric': 0.20355191256830601, 'fraction_numerical': 0.006830601092896175, 'mean_word_length': 3.725806451612903, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6362057', 'n_tokens_mistral': 494, 'n_tokens_neox': 487, 'n_words': 104}