mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-02-01 15:23:03 +00:00
Merge pull request #91 from JacksonTian/cov
Use istanbul for test coverage
This commit is contained in:
commit
cd72215be0
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,4 +3,5 @@ sftp-config.json
|
||||
diff
|
||||
log
|
||||
npm-debug.log
|
||||
test/App/Runtime/Cache/
|
||||
test/App/Runtime/Cache/
|
||||
coverage
|
||||
|
||||
8
Makefile
8
Makefile
@ -2,21 +2,23 @@ TESTS = test/test/*.js
|
||||
REPORTER = spec
|
||||
TIMEOUT = 10000
|
||||
MOCHA_OPTS =
|
||||
ISTANBUL = ./node_modules/.bin/istanbul
|
||||
MOCHA = ./node_modules/mocha/bin/_mocha
|
||||
|
||||
install:
|
||||
@npm install
|
||||
|
||||
test: install
|
||||
@NODE_ENV=test ./node_modules/mocha/bin/mocha \
|
||||
--reporter $(REPORTER) \
|
||||
--reporter $(REPORTER) \
|
||||
--timeout $(TIMEOUT) \
|
||||
$(MOCHA_OPTS) \
|
||||
$(TESTS)
|
||||
@NODE_ENV=test ./node_modules/jshint/bin/jshint lib/
|
||||
|
||||
test-cov:
|
||||
@URLRAR_COV=1 $(MAKE) test MOCHA_OPTS='--require blanket -R html-cov > coverage.html'
|
||||
@$(ISTANBUL) cover --report html $(MOCHA) -- -t $(TIMEOUT) -R spec $(TESTS)
|
||||
|
||||
test-all: test test-cov
|
||||
|
||||
.PHONY: test-cov test test-all
|
||||
.PHONY: test-cov test test-all
|
||||
|
||||
10
package.json
10
package.json
@ -24,17 +24,11 @@
|
||||
"websocket": "1.0.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"blanket": "1.1.6",
|
||||
"should": "4.0.4",
|
||||
"jshint": "2.5.1",
|
||||
"mocha": "1.20.1",
|
||||
"muk": "0.3.1"
|
||||
},
|
||||
"config": {
|
||||
"blanket": {
|
||||
"pattern": "/thinkjs/lib/",
|
||||
"data-cover-never": "node_modules"
|
||||
}
|
||||
"muk": "0.3.1",
|
||||
"istanbul": "*"
|
||||
},
|
||||
"keywords": [
|
||||
"thinkjs",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user