forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
001bda2
commit c4ba8f8
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
;(function(){ | ||
|
||
var __filename = (function(){ | ||
var scripts = document.getElementsByTagName('script'); | ||
var a = document.createElement('a'); | ||
a.href = scripts[scripts.length-1].src; | ||
return a.pathname; | ||
}()); | ||
|
||
var __dirname = __filename.split('/').reverse().slice(1).reverse().join('/'); | ||
|
||
document.head.appendChild(function(){ | ||
var link = document.createElement('link'); | ||
link.rel = 'stylesheet'; | ||
link.href = __dirname + '/../vendor/jasmine/jasmine.css'; | ||
return link; | ||
}()); | ||
|
||
var cacheBust = '?_=' + Date.now().toString(36); | ||
|
||
document.write('<script src="' + __dirname + '/../build/jasmine.js' + cacheBust + '"><\/script>'); | ||
document.write('<script src="' + __dirname + '/../build/react.js' + cacheBust + '"><\/script>'); | ||
document.write('<script src="' + __dirname + '/../build/react-test.js' + cacheBust + '"><\/script>'); | ||
document.write('<script src="' + __dirname + '/../test/the files to test.generated.js' + cacheBust + '"><\/script>'); | ||
document.write('<script src="' + __dirname + '/../test/jasmine-execute.js' + cacheBust + '"><\/script>'); | ||
|
||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!doctype html> | ||
<meta charset=utf-8> | ||
<script src="browser-runner.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
;(function(env){ | ||
// Clean up any nodes the previous test might have added. | ||
env.afterEach(function() { | ||
harness.removeNextSiblings(document.body); | ||
harness.removeNextSiblings(document.getElementById("HTMLReporter")); | ||
}); | ||
|
||
window.onload = function(){ | ||
env.execute(); | ||
} | ||
})(jasmine.getEnv()); |