Skip to content

Commit c51273b

Browse files
committed
Add test coverage analysis.
- jstd upgrade to head from 2010-11-11 - coverage plugin from the same head as jstd - test-coverage.sh and server-coverage.sh scripts - jstd configuration Generate html by installing lconv (brew or port) and run: genhtml tmp/lcov/jsTestDriver.conf-coverage.dat to generate html docs.
1 parent 0a8b316 commit c51273b

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

jsTestDriver-coverage.conf

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
server: http://localhost:9876
2+
3+
load:
4+
- lib/jasmine-1.0.1/jasmine.js
5+
- lib/jasmine-jstd-adapter/JasmineAdapter.js
6+
- lib/jquery/jquery-1.4.2.js
7+
- test/jquery_remove.js
8+
- src/Angular.js
9+
- src/JSON.js
10+
- src/*.js
11+
- example/personalLog/*.js
12+
- test/testabilityPatch.js
13+
- src/scenario/Scenario.js
14+
- src/scenario/output/*.js
15+
- src/scenario/*.js
16+
- test/angular-mocks.js
17+
- test/scenario/*.js
18+
- test/scenario/output/*.js
19+
- test/*.js
20+
- example/personalLog/test/*.js
21+
22+
exclude:
23+
- test/jquery_alias.js
24+
- src/angular.prefix
25+
- src/angular.suffix
26+
- src/angular-bootstrap.js
27+
- src/scenario/angular-bootstrap.js
28+
- src/AngularPublic.js
29+
30+
plugin:
31+
- name: "coverage"
32+
jar: "lib/jstestdriver/coverage.jar"
33+
module: "com.google.jstestdriver.coverage.CoverageModule"
34+

lib/jstestdriver/JsTestDriver.jar

39.2 KB
Binary file not shown.

lib/jstestdriver/coverage.jar

2.13 MB
Binary file not shown.

server-coverage.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
java -jar lib/jstestdriver/JsTestDriver.jar --port 9876 --browserTimeout 20000 --config jsTestDriver-coverage.conf

test-coverage.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
tests=$1
3+
if [[ $tests = "" ]]; then
4+
tests="all"
5+
fi
6+
7+
java -Xmx1g -jar lib/jstestdriver/JsTestDriver.jar --config jsTestDriver-coverage.conf --testOutput=tmp/lcov --tests "$tests"

0 commit comments

Comments
 (0)