Skip to content

Commit

Permalink
chore: enable coverage unit tests report
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzalowski committed Apr 18, 2024
1 parent 214c978 commit 2422861
Show file tree
Hide file tree
Showing 5 changed files with 701 additions and 401 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ changes.
- Change regex for parsing urls to match urls without protocol [Issue 655](https://github.com/IntersectMBO/govtool/issues/655)
- Integrate ga displaying metadata validation with the validation service [Issue 712](https://github.com/IntersectMBO/govtool/issues/712)
- Correct text of the governance action type [Issue 651](https://github.com/IntersectMBO/govtool/issues/651)
- Enable coverage tests report

### Added

Expand Down
1 change: 1 addition & 0 deletions govtool/frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/.lighthouseci
/yarn-error.log
.env
coverage
5 changes: 4 additions & 1 deletion govtool/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"test": "vitest",
"test:coverage": "vitest --coverage",
"test:verbose": "vitest --reporter=verbose",
"test:ui": "vitest --ui",
"test-storybook": "test-storybook",
"test:storybook": "test-storybook",
"test:watch": "vitest watch",
"tsc": "npx tsc --noEmit --skipLibCheck"
},
Expand Down Expand Up @@ -73,6 +75,7 @@
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"@vitejs/plugin-react": "^4.0.0",
"@vitest/coverage-v8": "^1.5.0",
"@vitest/ui": "^1.1.0",
"chromatic": "^11.3.0",
"eslint": "^8.38.0",
Expand Down
15 changes: 14 additions & 1 deletion govtool/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,20 @@ const vitestConfig = defineVitestConfig({
setupFiles: "./src/setupTests.ts",
globals: true,
environment: "jsdom",
reporters: "verbose",
reporters: ["verbose", "junit"],
coverage: {
include: [
"src/components/**/*",
"src/consts/**/*",
"src/context/**/*",
"src/hooks/**/*",
"src/services/**/*",
"src/utils/**/*",
],
provider: "v8",
reporter: ["json-summary"],
enabled: true,
},
},
});

Expand Down
Loading

0 comments on commit 2422861

Please sign in to comment.