Added c8 test coverage to all packages

refs https://github.com/TryGhost/Team/issues/870

- using `c8` allows us to see test coverage for all packages in the repo
- this commit adds `c8` as a dev dependency and prepends the `mocha`
  command with `c8` so it runs on all tests
This commit is contained in:
Daniel Lockyer 2021-07-14 11:26:06 +01:00
parent 9979768591
commit f918398779
16 changed files with 32 additions and 16 deletions

View File

@ -8,7 +8,7 @@
"types": "types/index.d.ts",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint",
"pretest": "yarn types",
@ -24,6 +24,7 @@
"devDependencies": {
"@types/mocha": "8.2.3",
"@types/sinon": "10.0.2",
"c8": "7.7.3",
"mocha": "9.0.0",
"should": "13.2.3",
"sinon": "11.0.0",

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -19,6 +19,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"mocha": "9.0.0",
"should": "13.2.3",
"sinon": "11.0.0"

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -19,6 +19,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"mocha": "9.0.0",
"should": "13.2.3",
"sinon": "11.0.0"

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -19,6 +19,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"mocha": "9.0.0",
"should": "13.2.3",
"sinon": "11.0.0"

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -19,6 +19,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"mocha": "9.0.0",
"should": "13.2.3",
"sinon": "11.0.0"

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -20,6 +20,7 @@
},
"devDependencies": {
"@sinonjs/fake-timers": "7.1.2",
"c8": "7.7.3",
"date-fns": "2.22.1",
"delay": "5.0.0",
"mocha": "9.0.0",

View File

@ -8,7 +8,7 @@
"exports": "./lib/limit-service.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -20,6 +20,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"mocha": "9.0.0",
"should": "13.2.3",
"sinon": "11.0.0"

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"types": "rm -rf types && tsc",
"pretest": "yarn types",
@ -21,6 +21,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"mocha": "9.0.0",
"should": "13.2.3",
"sinon": "11.0.0",

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"types": "rm -r types && tsc",
"pretest": "yarn types",
@ -23,6 +23,7 @@
"devDependencies": {
"@types/express": "4.17.13",
"@types/mocha": "8.2.3",
"c8": "7.7.3",
"express": "4.17.1",
"mocha": "9.0.0",
"should": "13.2.3",

View File

@ -8,7 +8,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha ./test/**/*.test.js",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -20,6 +20,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"mocha": "9.0.0",
"should": "13.2.3",
"sinon": "11.0.0"

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -19,6 +19,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"mocha": "9.0.0",
"should": "13.2.3",
"sinon": "11.0.0"

View File

@ -7,7 +7,7 @@
"main": "lib/index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -18,6 +18,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"mocha": "9.0.0",
"should": "13.2.3",
"sinon": "11.0.0"

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -19,6 +19,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"mocha": "9.0.0",
"should": "13.2.3",
"sinon": "11.0.0"

View File

@ -8,7 +8,7 @@
"types": "./types/index.d.ts",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint",
"pretest": "yarn types",
@ -24,6 +24,7 @@
"devDependencies": {
"@types/express": "4.17.13",
"@types/mocha": "8.2.3",
"c8": "7.7.3",
"express": "4.17.1",
"mocha": "9.0.0",
"should": "13.2.3",

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -19,6 +19,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"mocha": "9.0.0",
"supertest": "6.1.3"
}

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"dev": "echo \"Implement me!\"",
"test": "NODE_ENV=testing mocha './test/**/*.test.js'",
"test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
"lint": "eslint . --ext .js --cache",
"posttest": "yarn lint"
},
@ -19,6 +19,7 @@
"access": "public"
},
"devDependencies": {
"c8": "7.7.3",
"folder-hash": "4.0.1",
"mocha": "9.0.0",
"should": "13.2.3",