Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: test coverage #838

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ server
**/*.test.ts
**/*.test.tsx
__mocks__
./vite.config.ts
vite.config.ts
./vite.codemods.config.ts
./rollup.config.js
.storybook
3 changes: 2 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ sonar.language=ts
sonar.sourceEncoding=UTF-8
sonar.exclusions=docs/**, rollup.config.js, typeDocs/**, **/__snapshots__/**, **/*.stories.tsx, **/*.mdx, src/theme/globals/constants/**, src/theme/tokens/semantic/variables/**, src/theme/tokens/components/variables/**
sonar.gitlab.max_critical_issues_gate=4
sonar.coverage.exclusions=**/test/**, **/tests/**, typeDocs/**, docs/**, **/__snapshots__/**, **/*.stories.tsx, **/*.mdx, **/*.tokens.ts, **/*.test.*, **/*.tests.*, rollup.config.js, src/theme/globals/constants/**, src/theme/tokens/semantic/variables/**, src/theme/tokens/components/variables/**
sonar.test.inclusions=**/*.test.ts,**/*.test.tsx,**/*.tests.ts,**/*.tests.tsx
sonar.coverage.exclusions=**/test/**,**/tests/**,typeDocs/**,docs/**,**/__snapshots__/**,**/*.stories.tsx,**/*.mdx,**/*.tokens.ts,**/*.test.*,**/*.tests.*,**/*.style.ts,**/*.styles.ts,rollup.config.js,src/theme/globals/constants/**,src/theme/tokens/semantic/variables/**,src/theme/tokens/components/variables/**
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
sonar.organization=orfium
9 changes: 6 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,17 @@ export default defineConfig(({ mode }) => {
environment: 'jsdom',
setupFiles: './src/test/setup.ts',
coverage: {
provider: 'v8', // or 'istanbul'
reporter: ['text', 'html', 'json', 'lcov'],
provider: 'v8',
include: ['src'],
exclude: [
...coverageConfigDefaults.exclude,
'**/*.stories.tsx',
'**/*.style.ts',
'**/*.styles.ts',
'**/styles.ts',
'**/__mocks__/',
'src/config/',
'src/test/',
'test',
],
},
exclude: [...configDefaults.exclude],
Expand Down
Loading