karma-runner / karma-runner/karma-coverage

coverage and progress reporters combined show wrong line number on error

Open
#105 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
771
Forks
242
PR merge metrics
No merged PRs in 30d

Description

with

```
reporters: ['progress']
```

my error line number is well reported

```
PhantomJS 1.9.7 (Linux) ERROR
ReferenceError: Can't find variable: isArray
at /home/webskin/???.js:741
```

but with

```
reporters: ['coverage', 'progress']
```

I get

```
PhantomJS 1.9.7 (Linux) ERROR
ReferenceError: Can't find variable: isArray
at /home/webskin/???.js:9
```

Line number `9` is wrong

My tests are written in coffee and my tested files are written in js

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with reporters set first to ['progress'] and then to ['coverage', 'progress'], using CoffeeScript tests against JavaScript files. Trace the coverage and progress reporter interaction and verify that the combined configuration reports the actual error line, such as 741 rather than 9.

Written by the indexing model from the issue text.

Assessment

Tech stack
coffeescript, javascript
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.