<commit_before><!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>Spotlight.js Test Suite</title>
		<link rel="stylesheet" href="../vendor/qunit/qunit/qunit.css">
	</head>
	<body>
		<div id="qunit"></div>
		<script src="../spotlight.js"></script>
		<script src="../vendor/qunit/qunit/qunit.js"></script>
		<script>
			// load test.js if not using require.js
			document.write(/[?&]norequire=true(?:&|$)/.test(location.search)
				? '<script src="test.js"><\/script>'
				: '<script src="../vendor/requirejs/require.js"><\/script>'
			);
		</script>
		<script>
			// load Spotlight as a module
			var spotlight2;

			window.require && require({
				'baseUrl': '../vendor/requirejs/',
				'urlArgs': 't=' + (+new Date),
				'paths': {
					'spotlight': '../../spotlight'
				}
			},
			['spotlight'], function(spotlight) {
				spotlight2 = spotlight;
				require(['test.js']);
			});
		</script>
	</body>
</html><commit_msg>Fix tests when using an AMD loader.<commit_after><!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>Spotlight.js Test Suite</title>
		<link rel="stylesheet" href="../vendor/qunit/qunit/qunit.css">
	</head>
	<body>
		<div id="qunit"></div>
		<script src="../spotlight.js"></script>
		<script src="../vendor/qunit/qunit/qunit.js"></script>
		<script>
			QUnit.urlParams.norequire = /[?&]norequire=true(?:&|$)/.test(location.search);

			// load test.js if not using require.js
			document.write(QUnit.urlParams.norequire
				? '<script src="test.js"><\/script>'
				: '<script src="../vendor/requirejs/require.js"><\/script>'
			);
		</script>
		<script>
			var spotlight2;

			if (window.require) {
				QUnit.config.autostart = false;

				// load Spotlight.js as a module
				require({
					'baseUrl': '../vendor/requirejs/',
					'urlArgs': 't=' + (+new Date),
					'paths': {
						'spotlight': '../../spotlight'
					}
				},
				['spotlight'], function(spotlight) {
					spotlight2 = spotlight;
					require(['test.js'], function() {
						QUnit.start();
					});
				});
			}
		</script>
	</body>
</html>
{'fraction_non_alphanumeric': 0.22462722462722462, 'fraction_numerical': 0.002886002886002886, 'mean_word_length': 3.0154440154440154, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, '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': '7438226', 'n_tokens_mistral': 890, 'n_tokens_neox': 729, 'n_words': 134}