Skip to content

Commit

Permalink
Replaceing nyc by c8 to support coverage of vm scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bchabrier committed Oct 4, 2021
1 parent 36edd9e commit 53b354c
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 506 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
"@types/passport-local": "^1.0.33",
"@types/rewire": "^2.5.28",
"@types/socket.io": "^2.1.0",
"c8": "^7.9.0",
"coveralls": "^3.0.2",
"mocha": "^8.2.1",
"nyc": "^15.0.1",
"passport-headerapikey": "^1.2.1",
"passport-http": "^0.3.0",
"rewire": "^5.0.0",
Expand All @@ -75,13 +75,13 @@
"build": "tsc",
"start": ": run domoja; TS_NODE_TRANSPILE_ONLY=true TS_NODE_COMPILER=typescript-cached-transpile ts-node domoja.ts",
"start:config": ": run domoja; TS_NODE_TRANSPILE_ONLY=true TS_NODE_COMPILER=typescript-cached-transpile ts-node domoja.ts ./config",
"test": ": run test coverage; trap 'tput cnorm' INT; nyc --extension .ts npm --scripts-prepend-node-path=auto run test:only",
"test": ": run test coverage; trap 'tput cnorm' INT; c8 --extension .ts npm --scripts-prepend-node-path=auto run test:only",
"test:only": ": run test suite once; trap 'tput cnorm' INT; ts-mocha test/**/*.ts modules/*/test/**/*.ts $WATCHPARAMS --exit; rc=$?; tput cnorm; exit $rc",
"test:watch": ": watch running test suite; trap 'tput cnorm' INT; WATCHPARAMS='-w --watch-extensions ts,yml' npm --scripts-prepend-node-path=auto run test:only",
"watch": ": watch running domoja in demo mode; handler() { kill $PID; exit; } ; trap handler INT; while true; do npm run start$TARGET & PID=$!; inotifywait -q -e modify -e move -e create -e delete -r . @node_modules --exclude 'test|sessions|\\.git|.*\\.yml|bin|www|\\.\\#.*|.*~'; killchildren() { for p in $*; do CIDs=$(pgrep -P $p); [ -z $CIDs ] || (killchildren $CIDs; kill $p); done; }; killchildren $PID; done",
"watch:config": ": watch running domoja; TARGET=:config npm --scripts-prepend-node-path=auto run watch",
"report": ": generate coverage report; nyc report",
"coverage": ": publish coverage report to coveralls; nyc report --reporter=text-lcov | coveralls",
"report": ": generate coverage report; c8 report",
"coverage": ": publish coverage report to coveralls; c8 report --reporter=text-lcov | coveralls",
"swagger:force": ": run swagger generation - requires typescript-rest-swagger; swaggerGen -c ./swaggerConfig.json",
"swagger": ": run swagger generation if needed; for f in api/*.ts; do [ ! -f api/swagger.json ] || [ $f -nt api/swagger.json ] && ( npm --scripts-prepend-node-path=auto run swagger:force; break ); done; exit 0",
"generate:demo": ": generate demo.yml; ./tools/generate_demo",
Expand Down
Loading

0 comments on commit 53b354c

Please sign in to comment.