<commit_before>'use strict';

var path = require('path');
var chai = require('chai');
var expect = chai.expect;

var vimlint = require('../lib/vimlint');

describe('Unit test for lib/vimlint.js', function () {
  it('should pass test', function (done) {
    vimlint(
      path.join(__dirname, 'succeeded.vim'),
      function (err, stdout, stderr) {
        expect(err).to.not.be.ok;
        done(err);
      });
  });
  
  it('should fail test', function (done) {
    vimlint(
      path.join(__dirname, 'failed.vim'),
      function (err, stdout, stderr) {
        expect(err).to.be.ok;
        done();
      });
  });
});<commit_msg>Output errors<commit_after>'use strict';

var path = require('path');
var chai = require('chai');
var expect = chai.expect;

var vimlint = require('../lib/vimlint');

describe('Unit test for lib/vimlint.js', function () {
  it('should pass test', function (done) {
    vimlint(
      path.join(__dirname, 'succeeded.vim'),
      function (err, stdout, stderr) {
        if (stdout) { process.stdout.write(stdout); }
        if (stderr) { process.stderr.write(stderr); }
        expect(err).to.not.be.ok;
        done(err);
      });
  });
  
  it('should fail test', function (done) {
    vimlint(
      path.join(__dirname, 'failed.vim'),
      function (err, stdout, stderr) {
        if (stdout) { process.stdout.write(stdout); }
        if (stderr) { process.stderr.write(stderr); }
        expect(err).to.be.ok;
        done();
      });
  });
});
{'fraction_non_alphanumeric': 0.17357512953367876, 'fraction_numerical': 0.0, 'mean_word_length': 2.388157894736842, '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': '3473855', 'n_tokens_mistral': 520, 'n_tokens_neox': 495, 'n_words': 107}