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:34:08 +01:00
parent 171e15bd13
commit f4e24a76e2
3 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"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",
"posttest": "yarn lint"
},

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"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",
"posttest": "yarn lint"
},

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"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",
"posttest": "yarn lint"
},