Reputation: 43
how to covered unit test on import module . tried "transformIgnorePatterns" and "coveragePathIgnorePatterns" to ignore it but its not working
Upvotes: 0
Views: 529
Reputation: 11270
In the Jest configuration, in the variable collectCoverageFrom, use a negative entry:
collectCoverageFrom: [
'<rootDir>/**/*.ts',
'!<rootDir>/**/*.interface.ts',
'!<rootDir>/**/*.module.ts',
'!<rootDir>/**/__mock__/*',
],
Upvotes: 1