<commit_before>import Enzyme, { shallow, render, mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import 'leaflet';
import 'leaflet-draw';

// React 16 Enzyme adapter
Enzyme.configure({ adapter: new Adapter() });

// Make Enzyme functions available in all test files without importing
global.shallow = shallow;
global.render = render;
global.mount = mount;

// add leaflet
global.L = L;

// Mock the window.fetch function
global.fetch = require('jest-fetch-mock');

// Fail tests on any warning
// console.error = message => { // eslint-disable-line
//   throw new Error(message); // eslint-disable-line
// };<commit_msg>Re-enable error catching (it does seem to swallow up important info on errors, so we have to keep an eye on it)<commit_after>import Enzyme, { shallow, render, mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import 'leaflet';
import 'leaflet-draw';

// React 16 Enzyme adapter
Enzyme.configure({ adapter: new Adapter() });

// Make Enzyme functions available in all test files without importing
global.shallow = shallow;
global.render = render;
global.mount = mount;

// add leaflet
global.L = L;

// Mock the window.fetch function
global.fetch = require('jest-fetch-mock');

// Fail tests on any warning
// this seems to swallow up important info on errors, making it harder to debug failing tests
// so we have to keep an eye on it
console.error = message => { // eslint-disable-line
  throw new Error(message); // eslint-disable-line
};
{'fraction_non_alphanumeric': 0.12050599201065246, 'fraction_numerical': 0.005326231691078562, 'mean_word_length': 4.026755852842809, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5587531', 'n_tokens_mistral': 448, 'n_tokens_neox': 426, 'n_words': 168}