<commit_before>import findUserWebpackConfig from '../findUserWebpackConfig';

const cwd = process.cwd();
afterEach(() => {
	process.chdir(cwd);
});

it('should return path to create-react-app Webpack config', () => {
	process.chdir('test/apps/cra');
	const result = findUserWebpackConfig();
	console.error('CWD1: ' + result + '\nCWD1: ' + process.cwd());  // eslint-disable-line no-console
	expect(result).toMatch(/^react-scripts\//);
});

it('should return an absolute path to user Webpack config located in project root folder', () => {
	process.chdir('test/apps/basic');
	const result = findUserWebpackConfig();
	console.error('CWD2: ' + result + '\nCWD2: ' + process.cwd());  // eslint-disable-line no-console
	expect(result).toMatch(/^\//);
	expect(result).toMatch(/webpack.config.js$/);
});

it('should return an absolute path to user Webpack config located in nested folder', () => {
	process.chdir('test/apps/webpack-nested');
	const result = findUserWebpackConfig();
	console.error('CWD3: ' + result + '\nCWD3: ' + process.cwd());  // eslint-disable-line no-console
	expect(result).toMatch(/^\//);
	expect(result).toMatch(/webpack.config.js$/);
});<commit_msg>Test: Remove debug info<commit_after>import findUserWebpackConfig from '../findUserWebpackConfig';

const cwd = process.cwd();
afterEach(() => {
	process.chdir(cwd);
});

it('should return path to create-react-app Webpack config', () => {
	process.chdir('test/apps/cra');
	const result = findUserWebpackConfig();
	expect(result).toMatch(/^react-scripts\//);
});

it('should return an absolute path to user Webpack config located in project root folder', () => {
	process.chdir('test/apps/basic');
	const result = findUserWebpackConfig();
	expect(result).toMatch(/^\//);
	expect(result).toMatch(/webpack.config.js$/);
});

it('should return an absolute path to user Webpack config located in nested folder', () => {
	process.chdir('test/apps/webpack-nested');
	const result = findUserWebpackConfig();
	expect(result).toMatch(/^\//);
	expect(result).toMatch(/webpack.config.js$/);
});
{'fraction_non_alphanumeric': 0.18673817649926866, 'fraction_numerical': 0.0029254022428083864, 'mean_word_length': 4.965116279069767, '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': '6884409', 'n_tokens_mistral': 661, 'n_tokens_neox': 654, 'n_words': 141}