Skip to content

Commit

Permalink
🏗 refactor coverage code
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed Mar 18, 2024
1 parent fa708b7 commit 5ef38a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"build": "tsc",
"size": "yarn run build && size-limit",
"lint": "eslint --cache --format=pretty --ext=.ts ./",
"test": "yarn run build && yarn run lint && if [[ -z $CI ]]; then vitest --run --coverage.enabled --coverage.reporter=text --coverage.reporter=html --coverage.reporter=clover --coverage.provider=istanbul; else vitest --run; fi",
"test": "yarn run build && yarn run lint && vitest --run",
"release": "yarn run build && np",
"prettier": "prettier --write --config .prettierrc.yaml {*.ts,*.json}"
},
Expand All @@ -56,7 +56,7 @@
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@vitest/coverage-istanbul": "^0.34.4",
"@vitest/coverage-v8": "^1.4.0",
"confusing-browser-globals": "^1.0.11",
"eslint": "^8.21.0",
"eslint-config-strictest": "^0.8.1",
Expand All @@ -74,7 +74,7 @@
"size-limit": "^11.1.1",
"superjson": "^2.2.1",
"typescript": "^5.4.2",
"vitest": "^0.34.4"
"vitest": "^1.4.0"
},
"size-limit": [
{
Expand Down
5 changes: 5 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ export default defineConfig({
restoreMocks: true,
// otherwise @testing-library/react can't cleanup after tests
globals: true,
coverage: {
enabled: true,
extension: 'js',
include: ['src/**/*'],
},
},
})

0 comments on commit 5ef38a1

Please sign in to comment.