Skip to content

Commit ba72630

Browse files
committed
build(coverage): fixed test coverage to include files without tests
1 parent 01f6e3d commit ba72630

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

jest.config.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ module.exports = {
3131
'^pages/(.*)$': `${docsSrc}/pages/$1`,
3232
'^utils/(.*)$': `${docsSrc}/utils/$1`,
3333
},
34-
coveragePathIgnorePatterns: [
35-
'/node_modules/',
36-
'<rootDir>/packages/documentation/src',
37-
'<rootDir>/testSetup',
38-
...packages.map((name) => `<rootDir>/packages/${name}/es`),
39-
...packages.map((name) => `<rootDir>/packages/${name}/lib`),
34+
collectCoverageFrom: [
35+
'<rootDir>/packages/*/src/**/*.{ts,tsx}',
36+
// internal usage and don't matter for the library coverage reports
37+
'!<rootDir>/packages/{dev-utils,documentation,material-icons,react-md}/src/**/*',
38+
// these are generated files
39+
'!<rootDir>/packages/*/src/scssVariables.ts',
40+
// index.ts files are always `export * from "./fileOrFolder"`
41+
'!<rootDir>/packages/**/index.ts',
4042
],
4143
watchPlugins: [
4244
'jest-watch-typeahead/filename',

0 commit comments

Comments
 (0)