Skip to content

Commit

Permalink
update coverage targets (#1807)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemh committed Mar 7, 2024
1 parent 923741d commit dd8c2e9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
9 changes: 7 additions & 2 deletions nyc.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
module.exports = {
include: ['pages/**/*.js', 'common/**/*.js', 'components/**/*.js', 'decorators/**/*.js'],
exclude: ['pages/api/__coverage__.js'],
include: [
'pages/**/*.{js,ts,tsx}',
'common/**/*.{js,ts,tsx}',
'components/**/*.{js,ts,tsx}',
'decorators/**/*.{js,ts,tsx}',
],
exclude: ['pages/api/__coverage__.{js,ts}'],
};
16 changes: 14 additions & 2 deletions vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ export default defineConfig({
},
coverage: {
reportsDirectory: './vitest-coverage',
include: [
'common/**/*.{js,ts,tsx}',
'components/**/*.{js,ts,tsx}',
'decorators/**/*.{js,ts,tsx}',
],
exclude: [
// Irrelevant configs and local-only scripts
'coverage/**',
'{cypress,vitest}-coverage/**',
'dist/**',
Expand All @@ -39,17 +45,23 @@ export default defineConfig({
'{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
'vitest.{workspace,projects}.[jt]s?(on)',
'.{eslint,mocha,prettier}rc.{?(c|m)js,yml}',
'scripts/**',
'test-utils/**',

// Folders covered by integration tests
'node_modules/**',
'cypress/**',
'common/config/**',
'common/styles/**',
'common/constants/**',
'scripts/**',
'test-utils/**',

// No real logic to test here
'common/utils/api-utils.{[jt]s}',
'components/ZipRecruiterJobs/ZipRecruiterJobs.{[jt]s}',
'components/Press/PressLinks/Articles.{[jt]s}',
'components/Timeline/historyData.{[jt]s}',

// Don't collect coverage from import/export mappers
'common/(.*)/index.{[jt]s}',
'components/(.*)/index.{[jt]s}',
],
Expand Down

0 comments on commit dd8c2e9

Please sign in to comment.