<commit_before>// use this file to automate the running of tests.
var runr     = require('./src/task/runr')
var execa    = require('./src/cli/execa-commands')
var spawn    = require('./src/cli/spawn-commands')
var painless = require('./src/bin/painless')

function execute (dir) {
  execa([{cmd: './src/bin/painless', args: [`test/${dir}/*.js`]}], () => {
    if (runr.args.lint) process.nextTick(() => {
      spawn([{cmd: './src/bin/painless', args: [`test/lint/${dir}.js`, '-a']}])
    })
  })
}

function arr () {
  execute('array')
}

function async1 () {
  execute('async')
}

function func () {
  execute('function')
}

function gen () {
  execute('generator')
}

function lang () {
  execute('lang')
}

function num () {
  execute('number')
}

function obj () {
  execute('object')<commit_msg>update test-runner <commit_after>// use this file to automate the running of tests.
var runr     = require('../src/task/runr')
var execa    = require('../src/cli/execa-commands')
var spawn    = require('../src/cli/spawn-commands')
var painless = require('../src/bin/painless')

function execute (dir) {
  execa([{cmd: '../src/bin/painless', args: [`spec/${dir}/*.js`]}], () => {
    if (runr.args.lint) process.nextTick(() => {
      spawn([{cmd: '../src/bin/painless', args: [`lint/${dir}.js`, '-a']}])
    })
  })
}

function arr () {
  execute('array')
}

function async1 () {
  execute('async')
}

function func () {
  execute('function')
}

function gen () {
  execute('generator')
}

function lang () {
  execute('lang')
}

function num () {
  execute('number')
}

function obj () {
  execute('object')
{'fraction_non_alphanumeric': 0.2249844623990056, 'fraction_numerical': 0.001243008079552517, 'mean_word_length': 3.3869209809264307, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1401535', 'n_tokens_mistral': 564, 'n_tokens_neox': 563, 'n_words': 117}