upgraded sauce harness
Lost jasmine directly instead of using a module builder because it was failing in IE8
Thomas Aylott committed
Oct 31, 2013 at 14:30 UTC
93c0a46a1d872d3aac1227b58eba5114dba13db7
1 file changed
+30
-13
test/sauce-harness.html
+30
-13
@@ -1,21 +1,38 @@
1
<!doctype html>
2
<meta charset=utf-8>
3
-
4
-<link rel="stylesheet" href="../vendor/jasmine/jasmine.css">
3
+<body>
4
<script>
5
+;(function(){
6
+
7
+ var urls = [
8
+ '../vendor/jasmine/jasmine.js',
9
+ '../vendor/jasmine/jasmine-support.js',
10
+ '../vendor/jasmine/jasmine-html.js',
11
+ '../node_modules/jasmine-tapreporter/src/tapreporter.js',
12
+ '../vendor/jasmine-jsreporter/jasmine-jsreporter.js',
13
+
14
+ 'testImageURL.browser.js',
15
+ 'reportTestResults.browser.js',
16
+
17
+ '../build/react.js',
18
+ '../build/react-test.js',
19
+ 'the-files-to-test.generated.js',
20
+ 'jasmine-execute.js'
21
+ ];
22
+
23
+ if (typeof Function.prototype.bind == 'undefined') {
24
+ urls.unshift('../node_modules/es5-shim/es5-sham.js');
25
+ urls.unshift('../node_modules/es5-shim/es5-shim.js');
26
+ }
27
7
-var __filename = location.protocol + '//' + location.hostname + ':' + location.port + location.pathname.replace(/^\/?/,'/');
8
-var __dirname = __filename.split('/').reverse().slice(1).reverse().join('/');
28
+ var cacheBust = '?_=' + Date.now().toString(36);
29
10
-var cacheBust = '?_=' + Date.now().toString(36);
30
+ for (var urls_index = -1, urls_length = urls.length; ++urls_index < urls_length;) {
31
+ document.write('<script src="' + urls[urls_index] + cacheBust + '"><\/script>');
32
+ }
33
12
-window.ReactWebWorker_URL = __dirname + '/../src/test/worker.js' + cacheBust;
34
+ var base = location.protocol + '//' + location.hostname + ':' + location.port + location.pathname.replace(/^\/?/,'/').split('/').reverse().slice(1).reverse().join('/');
35
+ window.ReactWebWorker_URL = base + '/../src/test/worker.js' + cacheBust;
36
37
+}());
38
</script>
15
-<script src='../build/jasmine.js'></script>
16
-<script src='../build/react.js'></script>
17
-<script src='../build/react-test.js'></script>
18
-<script src='../node_modules/jasmine-tapreporter/src/tapreporter.js'></script>
19
-<script src='../test/the-files-to-test.generated.js'></script>
20
-<script src="../vendor/jasmine-jsreporter/jasmine-jsreporter.js"></script>
21
-<script src='../test/jasmine-execute.js'></script>