istanbul-coverage-enforcer
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,14 +0,1 @@ | ||
{ | ||
"global": { | ||
"statements": 65.5, | ||
"branches": 50, | ||
"lines": 64, | ||
"functions": -10 | ||
}, | ||
"each": { | ||
"statements": 0, | ||
"branches": -20, | ||
"lines": 60, | ||
"functions": 100 | ||
} | ||
} | ||
{"global":{"lines":64.52,"statements":64.52,"functions":-2,"branches":50},"each":{}} |
13
index.js
@@ -1,2 +0,2 @@ | ||
// const enforce = require('./src/enforce-coverage'); | ||
const { enforce } = require('./src/enforce-coverage'); | ||
@@ -8,6 +8,7 @@ // Accept input threshold file path | ||
const regex = /^--coverage-path="[a-zA-Z]"$/i | ||
process.argv.slice(2).forEach((val, index) => { | ||
console.log(`${index}: ${val}`); | ||
console.log(regex.exec(val)); | ||
}); | ||
/** | ||
* Enforce coverage based on threshold, or fail the process | ||
* @param {*} coveragePath The path of coverage file | ||
* @param {*} thresholdPath The path to the coverage threshold file | ||
*/ | ||
module.exports = enforce; |
{ | ||
"name": "istanbul-coverage-enforcer", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A Nodejs package and cli tool to enforce code coverage", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
158287
15
1942