Skip to content

Commit

Permalink
+ added coverage to the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kasisoft committed Aug 22, 2024
1 parent 8183b23 commit 1183019
Show file tree
Hide file tree
Showing 5 changed files with 1,310 additions and 470 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ lib/
*.tgz
.vscode/
.scannerwork/

coverage/


4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ pipeline {
}
stage('Testing') {
steps {
sh 'pnpm test'
sh 'pnpm test:coverage'
}
}
stage('SonarQube Analysis') {
steps {
withSonarQubeEnv('sonarqube') {
sh '${SCANNER_HOME}/bin/sonar-scanner -Dsonar.projectKey=remark-imagetools -Dsonar.language=ts -Dsonar.sources=src'
sh '${SCANNER_HOME}/bin/sonar-scanner -Dsonar.projectKey=remark-imagetools -Dsonar.language=ts -Dsonar.sources=src -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info -Dsonar.typescript.lcov.reportPaths=coverage/lcov.info'
}
}
}
Expand Down
20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"prepack": "rollup -c",
"pack": "pnpm pack",
"sonar": "sonar-scanner",
"test": "vitest run"
"test": "vitest run",
"test:coverage": "vitest run --coverage"
},
"repository": {
"type": "git",
Expand All @@ -44,19 +45,22 @@
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@types/js-yaml": "^4.0.9",
"@types/unist": "^3.0.2",
"@types/unist": "^3.0.3",
"@vitest/coverage-istanbul": "^2.0.5",
"arktype": "1.0.29-alpha",
"c8": "^10.1.2",
"coverage-istanbul": "link:@vitest/coverage-istanbul",
"js-yaml": "^4.1.0",
"remark": "^15.0.1",
"remark-frontmatter": "^5.0.0",
"remark-parse": "^11.0.0",
"remark-stringify": "^11.0.0",
"rollup": "^4.12.0",
"tslib": "^2.6.2",
"typescript": "^5.3.2",
"unified": "^11.0.4",
"rollup": "^4.21.0",
"tslib": "^2.6.3",
"typescript": "^5.5.4",
"unified": "^11.0.5",
"unist-util-visit": "^5.0.0",
"vite": "^5.1.4",
"vitest": "^1.3.1"
"vite": "^5.4.2",
"vitest": "^2.0.5"
}
}
Loading

0 comments on commit 1183019

Please sign in to comment.