mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-01-12 22:45:52 +08:00
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.
This commit is contained in:
34
jsTestDriver-coverage.conf
Normal file
34
jsTestDriver-coverage.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
server: http://localhost:9876
|
||||
|
||||
load:
|
||||
- lib/jasmine-1.0.1/jasmine.js
|
||||
- lib/jasmine-jstd-adapter/JasmineAdapter.js
|
||||
- lib/jquery/jquery-1.4.2.js
|
||||
- test/jquery_remove.js
|
||||
- src/Angular.js
|
||||
- src/JSON.js
|
||||
- src/*.js
|
||||
- example/personalLog/*.js
|
||||
- test/testabilityPatch.js
|
||||
- src/scenario/Scenario.js
|
||||
- src/scenario/output/*.js
|
||||
- src/scenario/*.js
|
||||
- test/angular-mocks.js
|
||||
- test/scenario/*.js
|
||||
- test/scenario/output/*.js
|
||||
- test/*.js
|
||||
- example/personalLog/test/*.js
|
||||
|
||||
exclude:
|
||||
- test/jquery_alias.js
|
||||
- src/angular.prefix
|
||||
- src/angular.suffix
|
||||
- src/angular-bootstrap.js
|
||||
- src/scenario/angular-bootstrap.js
|
||||
- src/AngularPublic.js
|
||||
|
||||
plugin:
|
||||
- name: "coverage"
|
||||
jar: "lib/jstestdriver/coverage.jar"
|
||||
module: "com.google.jstestdriver.coverage.CoverageModule"
|
||||
|
||||
Binary file not shown.
BIN
lib/jstestdriver/coverage.jar
Normal file
BIN
lib/jstestdriver/coverage.jar
Normal file
Binary file not shown.
1
server-coverage.sh
Executable file
1
server-coverage.sh
Executable file
@@ -0,0 +1 @@
|
||||
java -jar lib/jstestdriver/JsTestDriver.jar --port 9876 --browserTimeout 20000 --config jsTestDriver-coverage.conf
|
||||
7
test-coverage.sh
Executable file
7
test-coverage.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
tests=$1
|
||||
if [[ $tests = "" ]]; then
|
||||
tests="all"
|
||||
fi
|
||||
|
||||
java -Xmx1g -jar lib/jstestdriver/JsTestDriver.jar --config jsTestDriver-coverage.conf --testOutput=tmp/lcov --tests "$tests"
|
||||
Reference in New Issue
Block a user