My coverage reporter fails to detect statements used if they are put inside a fakeAsync() during testing:
describe('countWords', () => {
it('should total number of words in string; should be 2 for "butt heaven" ', () => {
expect(comp.countWords('butt heaven')).toBe(2);
});
});
Will be detected fine but....
describe('countWords', () => {
it('should total number of words in string; should be 2 for "butt heaven" ', () => {
fakeAsync( () => {
expect(comp.countWords('butt heaven')).toBe(2);
});
});
});
Will cause karma to report
statement not covered and lower coverage percentage.
How can I solve this?