<commit_before>/* global test, expect */
import fakeEvents from './fakeEvents';

test('calling fakeEvents should generate an array containing btw. 60 and 120 objects', () => {
	expect(fakeEvents.length)
		.toBeGreaterThanOrEqual(60);
	expect(fakeEvents.length)
		.toBeLessThanOrEqual(120);
});<commit_msg>Make sure events have the right keys and an id<commit_after>/* global test, expect */
import fakeEvents from './fakeEvents';

test('calling fakeEvents should generate an array containing btw. 60 and 120 objects', () => {
	expect(fakeEvents.length)
		.toBeGreaterThanOrEqual(60);
	expect(fakeEvents.length)
		.toBeLessThanOrEqual(120);
});

test('events generated with fakeEvents should include 3 major keys: id, data & state', () => {
	fakeEvents.forEach((event) =>
		expect(Object.keys(event)).toEqual(['id', 'data', 'state'])
	);
});

test('all events should have a string id', () => {
	fakeEvents.forEach((event) => {
		expect(event.id).not.toBeUndefined();
		expect(typeof event.id).toBe('string');
	});
});
{'fraction_non_alphanumeric': 0.15748031496062992, 'fraction_numerical': 0.02066929133858268, 'mean_word_length': 5.35625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6419593', 'n_tokens_mistral': 331, 'n_tokens_neox': 307, 'n_words': 84}