<!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>
<!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>
Fix tests when using an AMD loader.
Fix tests when using an AMD loader.
