You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line 3 ( return;) is considered "partially covered". If I add additional newlines after the return statement, they come up as fully uncovered lines. If I remove the statement prior to the return statement, the problem goes away. If I stop using destructuring in the function arguments, the problem also goes away.
Avaq
changed the title
c8 considers the newlines after a return statement to be uncovered code
Newlines after a return statement considered to be uncovered code
Oct 10, 2019
System information
(also tested on Node 12.5.0)
Description
In some cases (see below), c8 considers the newlines after a return statement to be "uncovered code".
Steps to reproduce
Install c8:
$ npm install c8
Write the following content to
src/index.mjs
:Write the following content to
test/index.mjs
:Run c8:
Expected result
I expect to see no uncovered lines.
Actual result
Line
3
(return;
) is considered "partially covered". If I add additional newlines after the return statement, they come up as fully uncovered lines. If I remove the statement prior to the return statement, the problem goes away. If I stop using destructuring in the function arguments, the problem also goes away.Possible related issues
The text was updated successfully, but these errors were encountered: