Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong coverage with function named error #6

Open
yanickrochon opened this issue Jun 23, 2014 · 2 comments
Open

Wrong coverage with function named error #6

yanickrochon opened this issue Jun 23, 2014 · 2 comments

Comments

@yanickrochon
Copy link

I have to investigate more on what exactly can cause this, but here is the coverage of one of my files :

parser.js

parser.js 2

parser.js 3

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

@yanickrochon
Copy link
Author

Renaming the function error to throwErr (for example) seems to work. I don't know why error is not being covered and is an invalid function name, here.

@yanickrochon yanickrochon changed the title Wrong coverage Wrong coverage with function named error Jun 23, 2014
@1602
Copy link
Owner

1602 commented Jun 23, 2014

I guess that's because of regular expression that treat 'error' as special
case. good catch!

On 23 June 2014 16:53, Yanick Rochon [email protected] wrote:

Renaming the function error to throwErr (for example) seems to work. I
don't know why error is not being covered and is an invalid function
name, here.

Reply to this email directly or view it on GitHub
#6 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants