Added --all to c8 command

refs https://github.com/TryGhost/Toolbox/issues/203

- without `--all`, c8 ignores files that should be included in the
  coverage score but aren't used in tests
- this means we have artificially high scores in places where this isn't
  used
- this commit adds `--all` where previously missing
- where this fails `--check-coverage`, that has been removed for now
This commit is contained in:
Daniel Lockyer 2022-02-21 13:08:55 +01:00
parent d813510a07
commit db696a9272
13 changed files with 13 additions and 13 deletions

View File

@ -8,7 +8,7 @@
"types": "types", "types": "types",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --reporter text --reporter cobertura --check-coverage mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura --check-coverage mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --reporter text --reporter cobertura --check-coverage mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura --check-coverage mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --reporter text --reporter cobertura mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --reporter text --reporter cobertura --check-coverage mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --reporter text --reporter cobertura --check-coverage mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --reporter text --reporter cobertura --check-coverage mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --reporter text --reporter cobertura mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --reporter text --reporter cobertura mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --reporter text --reporter cobertura mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint '**/*.js'", "lint": "eslint '**/*.js'",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --reporter text --reporter cobertura --check-coverage mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --check-coverage mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --lines 60 --reporter text --reporter cobertura --check-coverage mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },

View File

@ -7,7 +7,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "echo \"Implement me!\"", "dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing c8 --check-coverage mocha './test/**/*.test.js'", "test": "NODE_ENV=testing c8 --all --check-coverage --reporter text --reporter cobertura mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache", "lint": "eslint . --ext .js --cache",
"posttest": "yarn lint" "posttest": "yarn lint"
}, },