Skip to content

Commit

Permalink
chore(test): setup vitest code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayllyz committed Aug 17, 2024
1 parent b24d985 commit 0fc8be1
Show file tree
Hide file tree
Showing 5 changed files with 225 additions and 80 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v4
with:
version: 9
run_install: true

- name: Test
run: pnpm test
run: pnpm test:cov
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# gitignore

node_modules/
coverage/

.npmignore
dist
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"scripts": {
"compile": "tsup && cp dist/legacy/legacy.cjs legacy.js && cp dist/legacy/legacy.d.cts legacy.d.ts",
"test": "vitest run",
"test:cov": "vitest run --coverage",
"pub": "pnpm run compile && npm publish --access public --no-git-checks",
"changeset": "changeset",
"ci:version": "changeset version",
Expand Down Expand Up @@ -77,9 +78,10 @@
"@changesets/cli": "^2.27.7",
"@swc/core": "^1.6.13",
"@types/node": "^20.14.10",
"@vitest/coverage-v8": "^2.0.5",
"terser": "^5.31.2",
"tsup": "^8.1.0",
"typescript": "^5.5.3",
"vitest": "^2.0.1"
"vitest": "^2.0.5"
}
}
Loading

0 comments on commit 0fc8be1

Please sign in to comment.