Skip to content
This repository has been archived by the owner on Mar 31, 2018. It is now read-only.

Commit

Permalink
Add HTML files to run the test suite with the HTML reporter.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrd committed Apr 29, 2014
1 parent ec36cd6 commit 79e2394
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
37 changes: 37 additions & 0 deletions testsuite-dev.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<title>Test suite - Jasmine HTML reporter example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/jasmine/1.3.1/jasmine.css"></link>
</head>
<body>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://cdn.jsdelivr.net/jasmine/1.3.1/jasmine.js"></script>
<script type="text/javascript" src="http://cdn.jsdelivr.net/jasmine/1.3.1/jasmine-html.js"></script>
<script type="text/javascript" src="./target/scala-2.11/example-test-extdeps.js"></script>
<script type="text/javascript" src="./target/scala-2.11/example-test-intdeps.js"></script>
<script type="text/javascript" src="./target/scala-2.11/example-test.js"></script>

<script type="text/javascript">
// Dummy function to prevent tests from failing
// They use it to include jQuery, but its already included above
function importScripts() {}

$(function() {
// Load tests
example.ScalaJSExampleTest();

// Setup and run Jasmine
var jasmineEnv = jasmine.getEnv();
var htmlReporter = new jasmine.HtmlReporter();
jasmineEnv.addReporter(htmlReporter);
jasmineEnv.specFilter = function(spec) {
return htmlReporter.specFilter(spec);
};
jasmineEnv.execute();
});
</script>

</body>
</html>
35 changes: 35 additions & 0 deletions testsuite-preopt.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<title>Test suite - Jasmine HTML reporter example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/jasmine/1.3.1/jasmine.css"></link>
</head>
<body>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://cdn.jsdelivr.net/jasmine/1.3.1/jasmine.js"></script>
<script type="text/javascript" src="http://cdn.jsdelivr.net/jasmine/1.3.1/jasmine-html.js"></script>
<script type="text/javascript" src="./target/scala-2.11/example-test-preopt.js"></script>

<script type="text/javascript">
// Dummy function to prevent tests from failing
// They use it to include jQuery, but its already included above
function importScripts() {}

$(function() {
// Load tests
example.ScalaJSExampleTest();

// Setup and run Jasmine
var jasmineEnv = jasmine.getEnv();
var htmlReporter = new jasmine.HtmlReporter();
jasmineEnv.addReporter(htmlReporter);
jasmineEnv.specFilter = function(spec) {
return htmlReporter.specFilter(spec);
};
jasmineEnv.execute();
});
</script>

</body>
</html>
35 changes: 35 additions & 0 deletions testsuite.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<title>Test suite - Jasmine HTML reporter example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/jasmine/1.3.1/jasmine.css"></link>
</head>
<body>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://cdn.jsdelivr.net/jasmine/1.3.1/jasmine.js"></script>
<script type="text/javascript" src="http://cdn.jsdelivr.net/jasmine/1.3.1/jasmine-html.js"></script>
<script type="text/javascript" src="./target/scala-2.11/example-test-opt.js"></script>

<script type="text/javascript">
// Dummy function to prevent tests from failing
// They use it to include jQuery, but its already included above
function importScripts() {}

$(function() {
// Load tests
example.ScalaJSExampleTest();

// Setup and run Jasmine
var jasmineEnv = jasmine.getEnv();
var htmlReporter = new jasmine.HtmlReporter();
jasmineEnv.addReporter(htmlReporter);
jasmineEnv.specFilter = function(spec) {
return htmlReporter.specFilter(spec);
};
jasmineEnv.execute();
});
</script>

</body>
</html>

0 comments on commit 79e2394

Please sign in to comment.