Skip to content

Commit

Permalink
Merge pull request #838 from Orfium/chore/test-coverage
Browse files Browse the repository at this point in the history
chore: test coverage
  • Loading branch information
geokaralis authored Nov 19, 2024
2 parents 0f8391e + 0e7c55a commit 94f47cf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
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

0 comments on commit 94f47cf

Please sign in to comment.