mirror of
https://github.com/chaijs/chai
synced 2024-11-15 08:17:14 +00:00
Merge pull request #237 from chaijs/coverage
Remove coveralls & generate coverage with istanbul
This commit is contained in:
commit
54a8b1152a
6 changed files with 18 additions and 41 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -16,7 +16,7 @@ components
|
|||
node_modules
|
||||
npm-debug.log
|
||||
|
||||
coverage.html
|
||||
coverage
|
||||
|
||||
test/auth/*
|
||||
!test/auth/.gitkeep
|
||||
|
|
|
@ -6,7 +6,7 @@ component.json
|
|||
components/
|
||||
build/
|
||||
lib-cov/
|
||||
coverage.html
|
||||
coverage/
|
||||
.travis.yml
|
||||
.mailmap
|
||||
Makefile
|
||||
|
|
31
Makefile
31
Makefile
|
@ -45,12 +45,10 @@ test-node: node_modules
|
|||
--reporter $(REPORTER) \
|
||||
$(TESTS)
|
||||
|
||||
test-cov: lib-cov
|
||||
@CHAI_COV=1 NODE_ENV=test ./node_modules/.bin/mocha \
|
||||
test-cov: node_modules
|
||||
@NODE_ENV=test ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- \
|
||||
--require ./test/bootstrap \
|
||||
--reporter html-cov \
|
||||
$(TESTS) \
|
||||
> coverage.html
|
||||
|
||||
test-phantom: build
|
||||
@printf "==> [Test :: Karma (PhantomJS)]\n"
|
||||
|
@ -62,27 +60,11 @@ test-sauce: build
|
|||
@CHAI_TEST_ENV=sauce ./node_modules/karma/bin/karma start \
|
||||
--single-run
|
||||
|
||||
test-coveralls: lib-cov
|
||||
@CHAI_COV=1 NODE_ENV=test ./node_modules/.bin/mocha \
|
||||
--require ./test/bootstrap \
|
||||
--reporter mocha-lcov-reporter \
|
||||
$(TESTS) \
|
||||
| ./node_modules/coveralls/bin/coveralls.js
|
||||
|
||||
test-travisci: lib-cov
|
||||
test-travisci:
|
||||
@echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
|
||||
@make test-node
|
||||
@make test-coveralls
|
||||
@make test-cov
|
||||
@make test-sauce
|
||||
|
||||
#
|
||||
# Coverage
|
||||
#
|
||||
|
||||
lib-cov:
|
||||
@rm -rf lib-cov
|
||||
@./node_modules/jscoverage/bin/jscoverage lib lib-cov
|
||||
|
||||
#
|
||||
# Clean up
|
||||
#
|
||||
|
@ -100,13 +82,12 @@ clean-components:
|
|||
@rm -rf components
|
||||
|
||||
clean-cov:
|
||||
@rm -rf lib-cov
|
||||
@rm -f coverage.html
|
||||
@rm -rf coverage
|
||||
|
||||
#
|
||||
# Instructions
|
||||
#
|
||||
|
||||
.PHONY: all
|
||||
.PHONY: test test-all test-node test-phantom test-sauce test-cov test-coveralls
|
||||
.PHONY: test test-all test-node test-phantom test-sauce test-cov
|
||||
.PHONY: clean clean-node clean-browser clean-components clean-cov
|
||||
|
|
|
@ -5,7 +5,7 @@ can be delightfully paired with any javascript testing framework.
|
|||
|
||||
For more information or to download plugins, view the [documentation](http://chaijs.com).
|
||||
|
||||
[![Build Status](https://travis-ci.org/chaijs/chai.png?branch=master)](https://travis-ci.org/chaijs/chai) [![Coverage Status](https://coveralls.io/repos/chaijs/chai/badge.png?branch=master)](https://coveralls.io/r/chaijs/chai?branch=master)
|
||||
[![Build Status](https://travis-ci.org/chaijs/chai.png?branch=master)](https://travis-ci.org/chaijs/chai)
|
||||
|
||||
[![Selenium Test Status](https://saucelabs.com/browser-matrix/chaijs.svg)](https://saucelabs.com/u/chaijs)
|
||||
|
||||
|
|
|
@ -32,12 +32,10 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"component": "*"
|
||||
, "coveralls": "2.0.16"
|
||||
, "jscoverage": "0.3.7"
|
||||
, "karma": "canary"
|
||||
, "karma-mocha": "*"
|
||||
, "karma-sauce-launcher": "git://github.com/embarkmobile/karma-sauce-launcher.git#feature-passfail"
|
||||
, "mocha": "1.8.2"
|
||||
, "mocha-lcov-reporter": "0.0.1"
|
||||
, "istanbul": "~0.1.44"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
* Attach chai to global
|
||||
*/
|
||||
|
||||
global.chai = (process && process.env && process.env.CHAI_COV)
|
||||
? require('../../lib-cov/chai')
|
||||
: require('../..');
|
||||
global.chai = require('../..');
|
||||
|
||||
/*!
|
||||
* Provide check for fail function.
|
||||
|
|
Loading…
Reference in a new issue