test_runner: support coverage of unnamed functions#47652
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Apr 23, 2023
Merged
test_runner: support coverage of unnamed functions#47652nodejs-github-bot merged 1 commit intonodejs:mainfrom
nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
This commit updates the code coverage logic to skip the first function in a file (which does not correspond to an actual function) instead of skipping all functions without a name.
Collaborator
|
Review requested:
|
MoLow
reviewed
Apr 20, 2023
| } | ||
|
|
||
| if (functionName.length > 0 && ranges.length > 0) { | ||
| if (j > 0 && ranges.length > 0) { |
Member
There was a problem hiding this comment.
is this also correct in the case of ESM?
Member
There was a problem hiding this comment.
i have the same question; CJS is wrapped in a function but i don't expect ESM to be
Contributor
Author
There was a problem hiding this comment.
Yes. I thought maybe it was a CJS specific thing, but it's not.
Contributor
Author
There was a problem hiding this comment.
{
"scriptId": "422",
"url": "file:///Users/cjihrig/iojs/node/test.mjs",
"functions": [
{
"functionName": "",
"ranges": [
{
"startOffset": 0,
"endOffset": 4462,
"count": 1
}
],
"isBlockCoverage": true
},
{
"functionName": "chickenSandwich",
"ranges": [
{
"startOffset": 49,
"endOffset": 80,
"count": 1
}
],
"isBlockCoverage": true
}
]
},
Member
There was a problem hiding this comment.
weird, is that something added by v8, or by node's esm implementation?
Contributor
Author
There was a problem hiding this comment.
That part is unclear to me.
MoLow
approved these changes
Apr 20, 2023
benjamingr
approved these changes
Apr 22, 2023
Collaborator
Collaborator
Collaborator
Collaborator
Collaborator
Collaborator
|
Landed in 53e3c0e |
This was referenced Apr 24, 2023
yjl9903
pushed a commit
to yjl9903/node
that referenced
this pull request
Apr 28, 2023
This commit updates the code coverage logic to skip the first function in a file (which does not correspond to an actual function) instead of skipping all functions without a name. PR-URL: nodejs#47652 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
yjl9903
pushed a commit
to yjl9903/node
that referenced
this pull request
Apr 28, 2023
This commit updates the code coverage logic to skip the first function in a file (which does not correspond to an actual function) instead of skipping all functions without a name. PR-URL: nodejs#47652 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
yjl9903
pushed a commit
to yjl9903/node
that referenced
this pull request
Apr 29, 2023
This commit updates the code coverage logic to skip the first function in a file (which does not correspond to an actual function) instead of skipping all functions without a name. PR-URL: nodejs#47652 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
targos
pushed a commit
that referenced
this pull request
May 2, 2023
This commit updates the code coverage logic to skip the first function in a file (which does not correspond to an actual function) instead of skipping all functions without a name. PR-URL: #47652 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
danielleadams
pushed a commit
that referenced
this pull request
Jul 6, 2023
This commit updates the code coverage logic to skip the first function in a file (which does not correspond to an actual function) instead of skipping all functions without a name. PR-URL: #47652 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
MoLow
pushed a commit
to MoLow/node
that referenced
this pull request
Jul 6, 2023
This commit updates the code coverage logic to skip the first function in a file (which does not correspond to an actual function) instead of skipping all functions without a name. PR-URL: nodejs#47652 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit updates the code coverage logic to skip the first function in a file (which does not correspond to an actual function) instead of skipping all functions without a name.