<commit_before>import test from 'ava';
import fn from './';

test('string', t => {
	const obj = {
		fooBar: 'hello',
		fooYo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	const expected = {
		Bar: 'hello',
		Yo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	t.same(fn(obj, 'foo', ''), expected);
	t.end();
});

test('regexp', t => {
	const obj = {
		fooBar: 'hello',
		fooYo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	const expected = {
		Bar: 'hello',
		Yo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	t.same(fn(obj, /foo/, ''), expected);
	t.end();
});

test('function', t => {
	const obj = {
		fooBar: 'hello',
		fooYo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	const expected = {
		FOOBar: 'hello',
		FOOYo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	t.same(fn(obj, 'foo', str => {
		return str.toUpperCase();
	}), expected);

	t.end();
});<commit_msg>Adjust tests<commit_after>import test from 'ava';
import fn from './';

test('string', t => {
	const obj = {
		fooBar: 'hello',
		fooYo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	const expected = {
		Bar: 'hello',
		Yo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	t.same(fn(obj, 'foo', ''), expected);
});

test('regexp', t => {
	const obj = {
		fooBar: 'hello',
		fooYo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	const expected = {
		Bar: 'hello',
		Yo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	t.same(fn(obj, /foo/, ''), expected);
});

test('function', t => {
	const obj = {
		fooBar: 'hello',
		fooYo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	const expected = {
		FOOBar: 'hello',
		FOOYo: 'hi',
		yoBar: 'hey',
		barYo: 'no'
	};

	t.same(fn(obj, 'foo', str => {
		return str.toUpperCase();
	}), expected);

});
{'fraction_non_alphanumeric': 0.24804334738109574, 'fraction_numerical': 0.0, 'mean_word_length': 3.0242130750605325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6209968', 'n_tokens_mistral': 844, 'n_tokens_neox': 744, 'n_words': 174}