Skip to content

Commit

Permalink
Couverture tests
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmalard committed Aug 24, 2023
1 parent 26fb34b commit c79021b
Show file tree
Hide file tree
Showing 6 changed files with 389 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ thumbs.db
# Editor-based Rest Client
.idea/httpRequests
/.idea/csv-plugin.xml

# Code coverage
coverage
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"compile:web": "cross-env MODE=production WEB=true NODE_OPTIONS='--max-old-space-size=8192' pnpm vite build packages/renderer",
"test": "pnpm run test:main && pnpm run test:preload && pnpm run test:renderer && pnpm run test:e2e",
"test:e2e": "pnpm run build && vitest run",
"test:main": "vitest run -r packages/main --passWithNoTests",
"test:preload": "vitest run -r packages/preload --passWithNoTests",
"test:renderer": "vitest run -r packages/renderer --passWithNoTests",
"test:main": "vitest run -r packages/main --passWithNoTests --coverage",
"test:preload": "vitest run -r packages/preload --passWithNoTests --coverage",
"test:renderer": "vitest run -r packages/renderer --passWithNoTests --coverage",
"watch": "node scripts/watch.mjs",
"watch:web": "cross-env WEB=true vite packages/renderer",
"preview:web": "pnpm compile:web && cross-env WEB=true vite preview packages/renderer",
Expand All @@ -44,6 +44,7 @@
"@typescript-eslint/eslint-plugin": "6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"@vitejs/plugin-vue": "4.3.3",
"@vitest/coverage-istanbul": "^0.34.2",
"@vue/test-utils": "2.4.1",
"cross-env": "7.0.3",
"electron": "26.0.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/main/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ const config = {
reportCompressedSize: false,
},
plugins: [injectAppVersion()],
test: {
coverage: {
provider: 'istanbul',
},
},
};

export default config;
5 changes: 5 additions & 0 deletions packages/preload/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ const config = {
reportCompressedSize: false,
},
plugins: [preload.vite(), injectAppVersion()],
test: {
coverage: {
provider: 'istanbul',
},
},
};

export default config;
3 changes: 3 additions & 0 deletions packages/renderer/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ const config = {
inline: ['vuetify'],
},
},
coverage: {
provider: 'istanbul',
},
},
plugins: générerExtentions(),
};
Expand Down
Loading

0 comments on commit c79021b

Please sign in to comment.