1602 / 1602/semicov

Wrong coverage with function named `error`

Open
#6 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2
Forks
2
PR merge metrics
No merged PRs in 30d

Description

I have to investigate more on what exactly can cause this, but here is the coverage of one of my [files](https://github.com/yanickrochon/co-efficient/blob/master/lib/parser.js) :

![parser.js](http://snag.gy/vFCst.jpg)

![parser.js 2](http://snag.gy/cxJN1.jpg)

![parser.js 3](http://snag.gy/4No5V.jpg)

I had to add the `console.log` to see if these lines were actually being executed or not...

Especially when the function is actually being called and properly covered.

![error](http://snag.gy/lqAj2.jpg)

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue is about incorrect coverage reporting for a function named 'error' in lib/parser.js. Start by examining the coverage tool's instrumentation and reporting logic, likely in the main semcov source files. Reproduce the issue by writing a test that calls the 'error' function and check the coverage output. Look at how function names are tracked and why 'error' might be misreported.

Written by the indexing model from the issue text.

Assessment

Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.