Skip to content

Commit 195656a

Browse files
committed
Build/test automation stuff
1 parent 5fee7a6 commit 195656a

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
BROWSER_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
2+
3+
deploy:
4+
npm publish
5+
6+
browser:
7+
open spec/SpecRunner.html
8+
9+
phantom:
10+
/usr/bin/env DISPLAY=:1 phantomjs spec/lib/run-jasmine.js spec/SpecRunner.html
11+
12+
jstd:
13+
/usr/bin/env DISPLAY=:1 java -jar spec/JsTestDriver-1.3.5.jar --config spec/jsTestDriver.conf --browser ${BROWSER_PATH} --port 4224 --tests 'all' --testOutput './target'
14+
15+
build: components
16+
@component build --dev
17+
18+
components: component.json
19+
@component install --dev
20+
21+
clean:
22+
rm -fr build components template.js
23+
24+
.PHONY: clean

spec/SpecRunner.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>Jasmine Spec Runner</title>
5+
6+
<link rel="stylesheet" type="text/css" href="lib/jasmine.css">
7+
8+
<script type="text/javascript" src="lib/jasmine.js"></script>
9+
<script type="text/javascript" src="lib/jasmine-html.js"></script>
10+
11+
<script type="text/javascript" src="../stack-parser.js"></script>
12+
13+
<script type="text/javascript" src="captured-errors.js"></script>
14+
<script type="text/javascript" src="stack-parser-spec.js"></script>
15+
16+
<script type="text/javascript">
17+
(function() {
18+
var jasmineEnv = jasmine.getEnv();
19+
jasmineEnv.updateInterval = 1000;
20+
21+
var htmlReporter = new jasmine.HtmlReporter();
22+
23+
jasmineEnv.addReporter(htmlReporter);
24+
25+
jasmineEnv.specFilter = function(spec) {
26+
return htmlReporter.specFilter(spec);
27+
};
28+
29+
var currentWindowOnload = window.onload;
30+
31+
window.onload = function() {
32+
if(currentWindowOnload) {
33+
currentWindowOnload();
34+
}
35+
execJasmine();
36+
};
37+
38+
function execJasmine() {
39+
jasmineEnv.execute();
40+
}
41+
})();
42+
</script>
43+
</head>
44+
<body>
45+
</body>
46+
</html>

0 commit comments

Comments
 (0)