mirror of
https://github.com/mts7/obsidian-word-frequency.git
synced 2026-07-22 05:43:07 +00:00
add stryker for mutation testing
This commit is contained in:
parent
f346130ac3
commit
38c0a635d4
5 changed files with 2223 additions and 53 deletions
3
.github/workflows/main.yaml
vendored
3
.github/workflows/main.yaml
vendored
|
|
@ -47,6 +47,9 @@ jobs:
|
|||
name: coverage-reports
|
||||
path: coverage/
|
||||
|
||||
- name: Run mutation testing
|
||||
run: npm run mutate
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
|
|||
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
|||
node_modules/
|
||||
dist/
|
||||
/coverage/
|
||||
/dist/
|
||||
/node_modules/
|
||||
/reports/
|
||||
/.stryker-tmp
|
||||
|
|
|
|||
2247
package-lock.json
generated
2247
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -17,7 +17,8 @@
|
|||
"lint-fix": "eslint . --ext .js,.ts --fix",
|
||||
"test": "jest",
|
||||
"coverage": "npx jest --coverage",
|
||||
"all": "npm run lint-fix && npm run format && npm run build && npm run coverage"
|
||||
"mutate": "stryker run",
|
||||
"all": "npm run lint-fix && npm run format && npm run build && npm run coverage && npm run mutate"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -36,6 +37,8 @@
|
|||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.0",
|
||||
"@rollup/plugin-typescript": "^12.1.2",
|
||||
"@stryker-mutator/core": "^8.7.1",
|
||||
"@stryker-mutator/jest-runner": "^8.7.1",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/node": "^22.13.9",
|
||||
|
|
|
|||
15
stryker.conf.json
Normal file
15
stryker.conf.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"reporters": ["html", "clear-text", "progress"],
|
||||
"testRunner": "jest",
|
||||
"coverageAnalysis": "perTest",
|
||||
"mutate": ["src/**/*.ts?(x)", "!src/__tests__/**/*.test.ts"],
|
||||
"jest": {
|
||||
"projectType": "custom"
|
||||
},
|
||||
"ignoreStatic": true,
|
||||
"thresholds": {
|
||||
"high": 90,
|
||||
"low": 75,
|
||||
"break": 65
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue