Browse Source

istanbul => nyc

pull/682/head
Vitaly Puzrin 4 years ago
parent
commit
ab51422d8a
  1. 1
      .gitignore
  2. 7
      .travis.yml
  3. 14
      Makefile
  4. 7
      package.json
  5. 2
      support/specsplit.js

1
.gitignore

@ -1,3 +1,4 @@
.nyc_output
benchmark/extra/
node_modules/
coverage/

7
.travis.yml

@ -1,6 +1,3 @@
language: node_js
node_js:
- '8'
- node
after_success: make report-coverage
sudo: false
node_js: node
after_success: npm run report-coveralls

14
Makefile

@ -38,19 +38,13 @@ gh-demo: demo
rm -rf ./demo
lint:
eslint .
npm run lint
test: lint
mocha
echo "CommonMark stat:\n"
./support/specsplit.js test/fixtures/commonmark/spec.txt
test:
npm test
coverage:
rm -rf coverage
istanbul cover node_modules/.bin/_mocha
report-coverage:
-istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
npm run coverage
doc:
rm -rf ./apidoc

7
package.json

@ -16,7 +16,10 @@
"markdown-it": "bin/markdown-it.js"
},
"scripts": {
"test": "make test"
"lint": "eslint .",
"test": "npm run lint && nyc mocha && node support/specsplit.js test/fixtures/commonmark/spec.txt",
"coverage": "npm run test && nyc report --reporter html",
"report-coveralls": "nyc report --reporter=text-lcov | coveralls"
},
"files": [
"index.js",
@ -41,7 +44,6 @@
"eslint": "^6.0.1",
"express": "^4.14.0",
"highlight.js": "^9.2.0",
"istanbul": "^0.4.5",
"markdown-it-abbr": "^1.0.4",
"markdown-it-container": "^2.0.0",
"markdown-it-deflist": "^2.0.0",
@ -55,6 +57,7 @@
"markdown-it-testgen": "^0.1.3",
"mocha": "^6.1.4",
"ndoc": "^5.0.0",
"nyc": "^15.0.1",
"pug-cli": "^1.0.0-alpha6",
"stylus": "^0.54.5",
"supertest": "^4.0.2",

2
support/specsplit.js

@ -106,7 +106,7 @@ readFile(options.spec, 'utf8', function (error, input) {
});
if (!options.type) {
console.log(util.format('passed samples - %s, failed samples - %s', good.length, bad.length));
console.log(util.format('CM spec stat: passed samples - %s, failed samples - %s', good.length, bad.length));
} else {
var data = options.type === 'good' ? good : bad;

Loading…
Cancel
Save