<commit_before>import sinon from 'sinon'
import chai from 'chai'
import sinonChai from 'sinon-chai'
import chaiAsPromised from 'chai-as-promised'

chai.use(sinonChai)
chai.use(chaiAsPromised)

global.chai = chai
global.sinon = sinon
global.expect = chai.expect
global.should = chai.should()<commit_msg>chore: intercept prop-type log-errors in tests in order to fail them<commit_after>import sinon from 'sinon'
import chai from 'chai'
import sinonChai from 'sinon-chai'
import chaiAsPromised from 'chai-as-promised'

chai.use(sinonChai)
chai.use(chaiAsPromised)

global.chai = chai
global.sinon = sinon
global.expect = chai.expect
global.should = chai.should()

const error = console.error // eslint-disable-line no-console
console.error = function(warning, ...args) { // eslint-disable-line no-console
  if (/(Invalid prop|Failed prop type)/.test(warning)) {
    throw new Error(warning)
  }
  error.apply(console, [warning, ...args])
}
{'fraction_non_alphanumeric': 0.12072649572649573, 'fraction_numerical': 0.0, 'mean_word_length': 4.8930817610062896, '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': '7348311', 'n_tokens_mistral': 336, 'n_tokens_neox': 334, 'n_words': 82}