Skip to content

Commit 8f7b95e

Browse files
authored
chore(test): Add more tests and coverage reports (#82)
1 parent a2950dc commit 8f7b95e

15 files changed

+612
-11
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ jobs:
4747

4848
- name: Run test
4949
run: pnpm test
50+
51+
- name: Report coverage
52+
if: always() && matrix.os == 'ubuntu-latest'
53+
uses: davelosert/vitest-coverage-report-action@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ dist-ssr
2525

2626
openapi
2727
*.tsbuildinfo
28+
coverage

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"preview": "npm run build && npm -C examples/react-app run generate:api",
1515
"prepublishOnly": "npm run build",
1616
"release": "npx git-ensure -a && npx bumpp --commit --tag --push",
17-
"test": "vitest"
17+
"test": "vitest --coverage.enabled true"
1818
},
1919
"repository": {
2020
"type": "git",
@@ -40,6 +40,7 @@
4040
"devDependencies": {
4141
"@hey-api/openapi-ts": "0.36.0",
4242
"@types/node": "^20.10.6",
43+
"@vitest/coverage-v8": "^1.5.0",
4344
"commander": "^12.0.0",
4445
"glob": "^10.3.10",
4546
"rimraf": "^5.0.5",

pnpm-lock.yaml

Lines changed: 159 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)