Add coverage

master
Paul Loyd 2017-11-05 01:13:56 +03:00
parent 1db63dbb98
commit b733333ba1
5 changed files with 8 additions and 8 deletions

3
.gitignore vendored
View File

@ -1 +1,4 @@
node_modules/ node_modules/
.nyc_output/
coverage/
npm-debug.log

View File

@ -6,3 +6,5 @@ node_js:
cache: cache:
directories: directories:
- "node_modules" - "node_modules"
after_success:
- "npm install coveralls@3 && nyc report --reporter=text-lcov | coveralls"

View File

@ -7,7 +7,6 @@ const pathlib = require('path');
const extractors = require('./extractors'); const extractors = require('./extractors');
const Command = require('./commands'); const Command = require('./commands');
const {Scope, Module} = require('./scope'); const {Scope, Module} = require('./scope');
const {consume, log} = require('./utils');
class Collector { class Collector {
constructor(parser, root = '.') { constructor(parser, root = '.') {

View File

@ -11,11 +11,6 @@ function partition(iter, predicate) {
return [left, right]; return [left, right];
} }
function log(arg, depth = 5) {
console.dir(arg, {colors: true, depth});
}
module.exports = { module.exports = {
partition, partition,
log,
}; };

View File

@ -27,9 +27,10 @@
"resolve": "^1.5.0" "resolve": "^1.5.0"
}, },
"devDependencies": { "devDependencies": {
"jsondiffpatch": "^0.2.5" "jsondiffpatch": "^0.2.5",
"nyc": "^11.3.0"
}, },
"scripts": { "scripts": {
"test": "node tests/do" "test": "nyc --reporter=text node tests/do"
} }
} }