Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

update coveralls strategy; closes #2984

Christopher Hilleraa5293312790
diff --git a/.travis.yml b/.travis.yml
index d5c75c26..f475c66b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -72,7 +72,7 @@ before_script: scripts/travis-before-script.sh
script: make $TARGET
-after_success: "npm run postcoverage && <coverage/lcov.info ./node_modules/coveralls/bin/coveralls.js"
+after_success: npm run coveralls
notifications:
urls:
diff --git a/Makefile b/Makefile
index b29655f2..c31e59fa 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ NYC := "node_modules/.bin/nyc"
ifdef COVERAGE
define test_node
- $(NYC) --report-dir coverage/reports/$(1) $(MOCHA)
+ $(NYC) --no-clean --report-dir coverage/reports/$(1) $(MOCHA)
endef
else
test_node := $(MOCHA)
diff --git a/package.json b/package.json
index 6c7687da..e9860604 100644
--- a/package.json
+++ b/package.json
@@ -301,10 +301,8 @@
"scripts": {
"lint": "eslint . bin/*",
"test": "make test && make clean",
- "precoverage": "rm -rf coverage",
- "coverage": "COVERAGE=true npm run test",
- "postcoverage": "istanbul-combine -d coverage -r lcov -r html coverage/reports/*/*.json",
- "preversion": "make test && rm mocha.js && make mocha.js && git add mocha.js"
+ "preversion": "make test && rm mocha.js && make mocha.js && git add mocha.js",
+ "coveralls": "nyc report --reporter=text-lcov | coveralls"
},
"dependencies": {
"browser-stdout": "1.3.0",
@@ -333,7 +331,6 @@
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "2.0.1",
"expect.js": "^0.3.1",
- "istanbul-combine": "^0.3.0",
"karma": "1.3.0",
"karma-browserify": "^5.0.5",
"karma-chrome-launcher": "^2.0.0",
diff --git a/scripts/travis-before-script.sh b/scripts/travis-before-script.sh
index 06219245..3ed55382 100755
--- a/scripts/travis-before-script.sh
+++ b/scripts/travis-before-script.sh
@@ -1,3 +1,7 @@
#!/usr/bin/env bash
+# bundle artifacts to AWS go here
mkdir -p .karma
+
+# because https://github.com/istanbuljs/nyc/pull/664
+mkdir -p .nyc_output