Created
October 18, 2012 00:03
-
-
Save baconpat/3909104 to your computer and use it in GitHub Desktop.
An example SpecRunner.html for a Jasmine test suite of an Ext JS 4 application
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>Jasmine Spec Runner</title> | |
<link rel="shortcut icon" type="image/png" href="lib/jasmine-1.2.0/jasmine_favicon.png"> | |
<link rel="stylesheet" type="text/css" href="lib/jasmine-1.2.0/jasmine.css"> | |
<script type="text/javascript" src="../js/ext-4.1.2a/ext-all-dev.js"></script> | |
<script type="text/javascript" src="../js/jquery-1.8.2.js"></script> | |
<script type="text/javascript" src="lib/jasmine-1.2.0/jasmine.js"></script> | |
<script type="text/javascript" src="lib/jasmine-1.2.0/jasmine-html.js"></script> | |
<script type="text/javascript"> | |
(function() { | |
Ext.Loader.setPath('MyApp', '../js/app'); | |
})(); | |
</script> | |
<!-- include spec files here... --> | |
<script type="text/javascript" src="spec/SpecHelper.js"></script> | |
<script type="text/javascript" src="spec/MyWidgetSpec.js"></script> | |
<script type="text/javascript"> | |
(function() { | |
var jasmineEnv = jasmine.getEnv(); | |
jasmineEnv.updateInterval = 1000; | |
var htmlReporter = new jasmine.HtmlReporter(); | |
jasmineEnv.addReporter(htmlReporter); | |
jasmineEnv.specFilter = function(spec) { | |
return htmlReporter.specFilter(spec); | |
}; | |
var currentWindowOnload = window.onload; | |
window.onload = function() { | |
if (currentWindowOnload) { | |
currentWindowOnload(); | |
} | |
execJasmine(); | |
}; | |
function execJasmine() { | |
Ext.onReady(function() { | |
jasmineEnv.execute(); | |
}); | |
} | |
})(); | |
</script> | |
</head> | |
<body> | |
<div id="test"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment