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

early return causes wrong line to be identified as uncovered #81

Open
bcoe opened this issue Nov 30, 2019 · 0 comments
Open

early return causes wrong line to be identified as uncovered #81

bcoe opened this issue Nov 30, 2019 · 0 comments

Comments

@bcoe
Copy link
Member

bcoe commented Nov 30, 2019

There's a slight hiccup with merging logic that was brought to my attention here.

https://user-images.githubusercontent.com/1324510/52922996-26a90980-3360-11e9-907c-6fa464fec932.png

Here's the output that we're failing to process appropriately:

{
      "scriptId": "61",
      "url": "file:///Users/benjamincoe/bcoe/c8/foo.js",
      "functions": [
        {
          "functionName": "",
          "ranges": [
            {
              "startOffset": 0,
              "endOffset": 112,
              "count": 1
            }
          ],
          "isBlockCoverage": true
        },
        {
          "functionName": "test",
          "ranges": [
            {
              "startOffset": 0,
              "endOffset": 97,
              "count": 1
            },
            {
              "startOffset": 44,
              "endOffset": 96,
              "count": 0
            }
          ],
          "isBlockCoverage": true
        },
        {
          "functionName": "bar",
          "ranges": [
            {
              "startOffset": 50,
              "endOffset": 95,
              "count": 1
            }
          ],
          "isBlockCoverage": true
        }
      ]
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant