I am using Angular 7 and Jest. When I was running jest with --codecoverage, all my tests passed but many branches in the constructor were not covered (similar to: B
--codecoverage
Go to tsconfig.spec.json in the types field under the compilerOptions and remove jasmine and add jest
"compilerOptions": { "module": "commonjs", "outDir": "./out-tsc/spec", "types": ["jest", "node"] }