Skip to content

Commit

Permalink
chore: add coverage script and tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
0xyaco committed Jul 19, 2024
1 parent 9965c35 commit 6215697
Show file tree
Hide file tree
Showing 6 changed files with 315 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ node_modules/
.turbo/

# Build
dist/
dist/

# Coverage
coverage/
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"build": "turbo run build",
"test": "turbo run test",
"coverage": "turbo run coverage",
"prepare": "husky",
"lint": "turbo run lint",
"lint:fix": "turbo run lint:fix",
Expand All @@ -21,6 +22,7 @@
"@ianvs/prettier-plugin-sort-imports": "4.3.1",
"@typescript-eslint/eslint-plugin": "7.16.1",
"@typescript-eslint/parser": "7.16.1",
"@vitest/coverage-v8": "^2.0.3",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.2.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/blocknumber/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"lint:fix": "pnpm lint --fix",
"format": "prettier --check .",
"format:fix": "prettier --write .",
"test": "vitest run"
"test": "vitest run",
"coverage": "vitest run --coverage"
},
"keywords": [],
"author": "",
Expand Down
1 change: 1 addition & 0 deletions packages/blocknumber/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default defineConfig({
include: ["src/**/*.spec.ts"], // Include test files
exclude: ["node_modules", "dist"], // Exclude certain directories
coverage: {
provider: "v8",
reporter: ["text", "json", "html"], // Coverage reporters
exclude: ["node_modules", "dist", "src/**/*.d.ts"], // Files to exclude from coverage
},
Expand Down
Loading

0 comments on commit 6215697

Please sign in to comment.