<commit_before>/*eslint-disable no-console */
"use strict";

module.exports = {
	protectReject(err) {
		if (err && err.stack) {
			console.error(err);
			console.error(err.stack);
		}
		expect(err).toBe(true);
	},

	extendExpect(expect) {
		expect.extend({
			toBeAnyOf(received, expected) {
				let pass = false;
				for (const item of expected) {
					if (received === item) {
						pass = true;
						break;
					}
				}

				let list = expected
					.map(item => item.toString())
					.join(", ");
				let message = `Expected ${received.toString()} to be any of [${list}]`;

				return {
					actual: received,
					message,
					pass
				};
			},
		});
	}
};<commit_msg>fix "toBeAnyOf" extender<commit_after>/*eslint-disable no-console */
"use strict";

module.exports = {
	protectReject(err) {
		if (err && err.stack) {
			console.error(err);
			console.error(err.stack);
		}
		expect(err).toBe(true);
	},

	extendExpect(expect) {
		expect.extend({
			toBeAnyOf(received, expected) {
				let pass = false;
				for (const item of expected) {
					if (received === item) {
						pass = true;
						break;
					}
				}

				let list = expected
					.map(item => item.toString())
					.join(", ");
				let message = `Expected ${received.toString()} to be any of [${list}]`;

				return {
					actual: received,
					message: () => message,
					pass
				};
			},
		});
	}
};
{'fraction_non_alphanumeric': 0.1693313953488372, 'fraction_numerical': 0.0, 'mean_word_length': 2.459798994974874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '613183', 'n_tokens_mistral': 622, 'n_tokens_neox': 467, 'n_words': 103}