Coverage: Add new exclusions for team coverage report (#112997)

This commit is contained in:
Paul Marbach 2025-11-04 14:35:56 -05:00 committed by GitHub
parent 3972046695
commit 5abc0d0d91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,17 +35,20 @@ const sourceFiles = teamFiles.filter((file) => {
const ext = path.extname(file);
return (
['.ts', '.tsx', '.js', '.jsx'].includes(ext) &&
// exclude all tests
// exclude all tests and mocks
!path.matchesGlob(file, '**/test/**/*') &&
!file.includes('.test.') &&
!file.includes('.spec.') &&
!path.matchesGlob(file, '**/__mocks__/**/*') &&
// and storybook stories
!file.includes('.story.') &&
// and generated files
!file.includes('.gen.ts') &&
// and type definitions
!file.includes('.d.ts') &&
!file.endsWith('/types.ts')
!file.endsWith('/types.ts') &&
// and anything in graveyard
!path.matchesGlob(file, '**/graveyard/**/*')
);
});