<commit_before>/* eslint import/no-extraneous-dependencies: off */
const jest = require('jest');

async function test() {
  const opts = {
    collectCoverage: true,
    coverageDirectory: 'build/coverage',
    collectCoverageFrom: ['src/**', '!src/zone.js', '!src/luxonFilled.js'],
    ci: !!process.env.CI
  };

  if (process.env.LIMIT_JEST) {
    opts.maxWorkers = 4;
  }

  await jest.runCLI(opts, ['./test']);
}

test();
<commit_msg>make failing tests fail the build<commit_after>/* eslint import/no-extraneous-dependencies: off */
const jest = require('jest');

async function test() {
  const opts = {
    collectCoverage: true,
    coverageDirectory: 'build/coverage',
    collectCoverageFrom: ['src/**', '!src/zone.js', '!src/luxonFilled.js'],
    ci: !!process.env.CI
  };

  if (process.env.LIMIT_JEST) {
    opts.maxWorkers = 4;
  }

  return jest.runCLI(opts, ['./test']);
}

test().then(({ results }) => {
  if (results.numFailedTests) {
    process.exit(1);
  }
});

{'fraction_non_alphanumeric': 0.18552497451580022, 'fraction_numerical': 0.0030581039755351682, 'mean_word_length': 3.6103286384976525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '6148590', 'n_tokens_mistral': 361, 'n_tokens_neox': 353, 'n_words': 69}