<commit_before>#!/usr/bin/env node
"use strict";

var Mocha = require("mocha");
var path = require("path");
var glob = require("glob");

var mocha = new Mocha({
  reporter: "spec",
  timeout: 200,
  slow: Infinity
});

var patterns = ["../node_modules/promises-aplus-tests/lib/tests/*.js", "./*-test.js"];

patterns.reduce(function(paths, pattern){
  return paths.concat(glob.sync(pattern, {
    cwd: __dirname
  }));
}, []).forEach(function(file){
  mocha.addFile(path.join("tests", file));
});

global.adapter = require("./adapter");

mocha.run(function(failures){
  process.exit(failures);
});<commit_msg>Spread `patterns` over multiple lines to ease disabling one<commit_after>#!/usr/bin/env node
"use strict";

var Mocha = require("mocha");
var path = require("path");
var glob = require("glob");

var mocha = new Mocha({
  reporter: "spec",
  timeout: 200,
  slow: Infinity
});

var patterns = [
  "../node_modules/promises-aplus-tests/lib/tests/*.js",
  "./*-test.js"
];

patterns.reduce(function(paths, pattern){
  return paths.concat(glob.sync(pattern, {
    cwd: __dirname
  }));
}, []).forEach(function(file){
  mocha.addFile(path.join("tests", file));
});

global.adapter = require("./adapter");

mocha.run(function(failures){
  process.exit(failures);
});
{'fraction_non_alphanumeric': 0.20347003154574134, 'fraction_numerical': 0.00473186119873817, 'mean_word_length': 4.742081447963801, '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': '5852304', 'n_tokens_mistral': 460, 'n_tokens_neox': 445, 'n_words': 88}