test: enable lcov reporter on ci
configure typescript coverage
This commit is contained in:
parent
e1fd4dc476
commit
e45a9afc86
2
.github/workflows/node.js.yml
vendored
2
.github/workflows/node.js.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npm run lint
|
||||
- run: npm run coverage
|
||||
- run: npm run coverage:lcov
|
||||
- name: Publish code coverage to CodeClimate
|
||||
uses: paambaati/codeclimate-action@v3.2.0
|
||||
env:
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
.nyc_output
|
||||
coverage
|
||||
*.seed
|
||||
*.log
|
||||
*.csv
|
||||
|
5
.mocharc.jsonc
Normal file
5
.mocharc.jsonc
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/mocharc",
|
||||
"require": "source-map-support/register",
|
||||
"require": "ts-node/register"
|
||||
}
|
6
.nycrc
Normal file
6
.nycrc
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/nycrc.json",
|
||||
"extends": "@istanbuljs/nyc-config-typescript",
|
||||
"all": true,
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
28
package-lock.json
generated
28
package-lock.json
generated
@ -18,6 +18,7 @@
|
||||
"peerjs": "bin/peerjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
||||
"@semantic-release/changelog": "^6.0.1",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@types/chai": "^4.2.11",
|
||||
@ -38,7 +39,8 @@
|
||||
"rimraf": "^3.0.2",
|
||||
"semantic-release": "^19.0.5",
|
||||
"sinon": "^7.5.0",
|
||||
"ts-node": "^8.7.0",
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-node": "^8.10.2",
|
||||
"typescript": "^4.1.2"
|
||||
},
|
||||
"engines": {
|
||||
@ -499,6 +501,21 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/@istanbuljs/nyc-config-typescript": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@istanbuljs/nyc-config-typescript/-/nyc-config-typescript-1.0.2.tgz",
|
||||
"integrity": "sha512-iKGIyMoyJuFnJRSVTZ78POIRvNnwZaWIf8vG4ZS3rQq58MMDrqEX2nnzx0R28V2X8JvmKYiqY9FP2hlJsm8A0w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@istanbuljs/schema": "^0.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"nyc": ">=15"
|
||||
}
|
||||
},
|
||||
"node_modules/@istanbuljs/schema": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
|
||||
@ -11493,6 +11510,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@istanbuljs/nyc-config-typescript": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@istanbuljs/nyc-config-typescript/-/nyc-config-typescript-1.0.2.tgz",
|
||||
"integrity": "sha512-iKGIyMoyJuFnJRSVTZ78POIRvNnwZaWIf8vG4ZS3rQq58MMDrqEX2nnzx0R28V2X8JvmKYiqY9FP2hlJsm8A0w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@istanbuljs/schema": "^0.1.2"
|
||||
}
|
||||
},
|
||||
"@istanbuljs/schema": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
|
||||
|
@ -33,8 +33,9 @@
|
||||
"lint": "eslint --ext .js,.ts .",
|
||||
"tsc": "tsc",
|
||||
"prebuild": "npm run lint",
|
||||
"test": "npm run lint && mocha -r ts-node/register \"test/**/*\"",
|
||||
"coverage": "nyc mocha -r ts-node/register \"test/**/*\"",
|
||||
"test": "npm run lint && mocha \"test/**/*\"",
|
||||
"coverage": "nyc mocha \"test/**/*\"",
|
||||
"coverage:lcov": "nyc --reporter=lcov mocha \"test/**/*\"",
|
||||
"start": "bin/peerjs --port ${PORT:=9000}",
|
||||
"dev:start": "npm-run-all build start",
|
||||
"dev": "nodemon --watch src -e ts --exec npm run dev:start",
|
||||
@ -47,6 +48,7 @@
|
||||
"yargs": "^15.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
||||
"@semantic-release/changelog": "^6.0.1",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@types/chai": "^4.2.11",
|
||||
@ -67,7 +69,8 @@
|
||||
"rimraf": "^3.0.2",
|
||||
"semantic-release": "^19.0.5",
|
||||
"sinon": "^7.5.0",
|
||||
"ts-node": "^8.7.0",
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-node": "^8.10.2",
|
||||
"typescript": "^4.1.2"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -14,7 +14,7 @@
|
||||
"noUnusedParameters": true,
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": false,
|
||||
"sourceMap": true,
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": [
|
||||
@ -24,4 +24,4 @@
|
||||
"test",
|
||||
"bin",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user