<commit_before>var path = require('path');
var expect = require('chai').expect;
var ttycolor = require('ttycolor');
describe('cli-command:', function() {
  it('should use logger middleware', function(done) {
    var cli = require('../../..');
    var middleware = cli.middleware;
    cli = cli()
      .use(middleware.logger)
      .on('complete', function(req) {
        expect(this.log).to.be.an('object');
        expect(this.log).to.be.instanceof(require('cli-logger').Logger);
        done();
      })
      .parse([]);
  });
  it('should use logger middleware with configuration', function(done) {
    var cli = require('../../..');
    var middleware = cli.middleware;
    cli = cli()
      .use(middleware.logger, {console: false})
      .on('complete', function(req) {
        expect(this.log).to.be.an('object');
        expect(this.log).to.be.instanceof(require('cli-logger').Logger);
        done();
      })
      .parse([]);
  });
  it('should print error via logger', function(done) {
    var cli = require('../../..');
    var middleware = cli.middleware;
    cli = cli(null, 'mock-logger-error')
      .configure({exit: false})
      .use(middleware.color)
      .use(middleware.logger)
      .option('--required <value>', 'required option')
      .on('complete', function(req) {
        if(typeof ttycolor.revert === 'function') ttycolor.revert();
        done();
      })
      .parse([]);
  });
});<commit_msg>Assert the log property is not enumerable.<commit_after>var path = require('path');
var expect = require('chai').expect;
var ttycolor = require('ttycolor');
describe('cli-command:', function() {
  it('should use logger middleware', function(done) {
    var cli = require('../../..');
    var middleware = cli.middleware;
    cli = cli()
      .use(middleware.logger)
      .on('complete', function(req) {
        expect(this.log).to.be.an('object');
        expect(this.log).to.be.instanceof(require('cli-logger').Logger);
        done();
      })
      .parse([]);
  });
  it('should use logger middleware with configuration', function(done) {
    var cli = require('../../..');
    var middleware = cli.middleware;
    cli = cli()
      .use(middleware.logger, {console: false})
      .on('complete', function(req) {
        var keys = Object.keys(this);
        var enumerated = [];
        for(var z in this) {
          enumerated.push(z);
        }
        expect(keys).to.eql(enumerated).to.eql([]);
        done();
      })
      .parse([]);
  });
  it('should print error via logger', function(done) {
    var cli = require('../../..');
    var middleware = cli.middleware;
    cli = cli(null, 'mock-logger-error')
      .configure({exit: false})
      .use(middleware.color)
      .use(middleware.logger)
      .option('--required <value>', 'required option')
      .on('complete', function(req) {
        if(typeof ttycolor.revert === 'function') ttycolor.revert();
        done();
      })
      .parse([]);
  });
});
{'fraction_non_alphanumeric': 0.19635011828320378, 'fraction_numerical': 0.0, 'mean_word_length': 2.6009732360097324, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2465924', 'n_tokens_mistral': 934, 'n_tokens_neox': 927, 'n_words': 187}