karma-runner / karma-runner/karma-coverage
How to print the title of `it` statements?
- Dominant language
- JavaScript
- Stars
- 771
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
### What is the problem
When I add karma-coverage to my Karma config, it stops printing the titles of `it` statements. Although it prints the title of `describe statements`.
This behaviour is not consistent and it prints the title of some `it` statements:

Here you see we have _Settings_, _SignMessageHOC_ and _SignMessage_ `describe` statement titles. but it has printed the title of only one of the `it` statements in only one of the `describe`statements.
How can I configure it to print all of the titles along with coverage report of the file?
### How I've configured Karma
This is how I've done it:
```
reporters: ['progress', 'coverage', 'mocha', 'junit'],
coverageReporter: {
check: {
global: {
statements: 80,
branches: 80,
functions: 80,
lines: 80,
excludes: [],
},
each: {
statements: 80,
branches: 80,
functions: 80,
lines: 80,
excludes: [],
overrides: {},
},
},
reporters: [
{
type: 'json',
dir: 'coverage/',
},
{
type: 'cobertura',
dir: 'coverage/',
},
{
type: onJenkins ? 'lcov' : 'html',
dir: 'coverage/',
},
{
type: 'text',
},
],
},
```
### Which version I'm using
karma: 1.7.1
karma-coverage: 1.1.1
Contributor guide
Research direction
No source file or test is named. Start by reproducing the missing `it` titles with the supplied Karma configuration, using karma 1.7.1 and karma-coverage 1.1.1, then trace how the `progress`, `coverage`, and `mocha` reporters interact. Done means identifying whether configuration can restore all titles or documenting the required behavior and adding a regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100