<commit_before>import { join } from 'path';
import { Pkg } from 'northbrook';
import * as expand from 'glob-expand';
import * as Mocha from 'mocha';

const defaultPatterns: Array<RegExp | string> =
  [
    /.*\.(spec|test)\.(js|ts)$/,
    /-(spec|test)\.(js|ts)$/,
    /(Spec|Test)\.(js|ts)$/,
    '!lib/**/*.ts',
    '!lib.es2015/**/*.ts',
    '!node_modules/**/*.*',
  ];

export function runTests(pkg: Pkg) {
  return new Promise((resolve, reject) => {
    console.log('Running tests for ' + pkg.name + '...');<commit_msg>fix(runTests): do not run .js files in generated folders<commit_after>import { join } from 'path';
import { Pkg } from 'northbrook';
import * as expand from 'glob-expand';
import * as Mocha from 'mocha';

const defaultPatterns: Array<RegExp | string> =
  [
    /.*\.(spec|test)\.(js|ts)$/,
    /-(spec|test)\.(js|ts)$/,
    /(Spec|Test)\.(js|ts)$/,
    '!lib/**/*.*',
    '!lib.es2015/**/*.*',
    '!node_modules/**/*.*',
  ];

export function runTests(pkg: Pkg) {
  return new Promise((resolve, reject) => {
    console.log('Running tests for ' + pkg.name + '...');
{'fraction_non_alphanumeric': 0.24014665444546288, 'fraction_numerical': 0.007332722273143905, 'mean_word_length': 3.2325581395348837, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4576891', 'n_tokens_mistral': 411, 'n_tokens_neox': 391, 'n_words': 88}