Skip to content

Commit

Permalink
test case for istanbuljs#81
Browse files Browse the repository at this point in the history
  • Loading branch information
glromeo committed Jan 19, 2022
1 parent b5198cc commit 07fb10a
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
47 changes: 47 additions & 0 deletions test/fixtures/early-return.js
@@ -0,0 +1,47 @@
module.exports = {
describe: "early return",
coverageV8: {
"scriptId": "61",
"url": "./test/fixtures/scripts/early.return.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
}
]
}
};
9 changes: 9 additions & 0 deletions test/fixtures/scripts/early.return.js
@@ -0,0 +1,9 @@
function test(foo = "foo") {
return {bar};

function bar() {
console.log("test");
}
}

test().bar();

0 comments on commit 07fb10a

Please sign in to comment.