1
0

Add footprints to coverage, streamline coverage script call

This commit is contained in:
Bán Dénes 2021-05-22 17:57:01 +02:00
parent 7f8b1c4c63
commit 76bb07183b
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@
"scripts": { "scripts": {
"build": "rollup -c", "build": "rollup -c",
"test": "mocha -r chai/register-should test/index.js", "test": "mocha -r chai/register-should test/index.js",
"coverage": "nyc --reporter=html --reporter=text mocha -r chai/register-should test/index.js" "coverage": "nyc --reporter=html --reporter=text npm test"
}, },
"dependencies": { "dependencies": {
"fs-extra": "^9.0.1", "fs-extra": "^9.0.1",
@ -33,7 +33,7 @@
"nyc": { "nyc": {
"all": true, "all": true,
"include": [ "include": [
"src/*.js" "src/**/*.js"
], ],
"exclude": [ "exclude": [
"src/cli.js", "src/cli.js",

View File

@ -18,6 +18,7 @@ const cap = s => s.charAt(0).toUpperCase() + s.slice(1)
for (const part of ['points', 'outlines', 'cases', 'pcbs']) { for (const part of ['points', 'outlines', 'cases', 'pcbs']) {
if (what && !what.includes(part)) continue if (what && !what.includes(part)) continue
describe(cap(part), function() { describe(cap(part), function() {
this.timeout(120000)
const dir = path.join(__dirname, part) const dir = path.join(__dirname, part)
for (const input_path of glob.sync(path.join(dir, '*.yaml'))) { for (const input_path of glob.sync(path.join(dir, '*.yaml'))) {
const basename = path.basename(input_path, '.yaml') const basename = path.basename(input_path, '.yaml')