Title: Support statement coverage · Issue #54530 · nodejs/node · GitHub
Open Graph Title: Support statement coverage · Issue #54530 · nodejs/node
X Title: Support statement coverage · Issue #54530 · nodejs/node
Description: I think the Node.js coverage reporter should include support for reporting statement coverage. My idea is to parse the source code into an Abstract Syntax Tree (AST) using acorn-walk, and then use the Statement callback to extract statem...
Open Graph Description: I think the Node.js coverage reporter should include support for reporting statement coverage. My idea is to parse the source code into an Abstract Syntax Tree (AST) using acorn-walk, and then use ...
X Description: I think the Node.js coverage reporter should include support for reporting statement coverage. My idea is to parse the source code into an Abstract Syntax Tree (AST) using acorn-walk, and then use ...
Opengraph URL: https://github.com/nodejs/node/issues/54530
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support statement coverage","articleBody":"I think the Node.js coverage reporter should include support for reporting statement coverage.\r\n\r\nMy idea is to parse the source code into an Abstract Syntax Tree (AST) using `acorn-walk`, and then use the `Statement` callback to extract statements. They could then be converted to `CoverageStatement`s, (similarly to how the `getLines` function works with lines to `CoverageLines`). \r\n\r\nThese statements could then be mapped to ranges in the same way that lines are handled in `mapRangeToLines`.\r\n\r\nI saw a (extremely complicated) way of doing this in \u003chttps://github.com/cenfun/monocart-coverage-reports/\u003e, so it appears to be possible.","author":{"url":"https://github.com/avivkeller","@type":"Person","name":"avivkeller"},"datePublished":"2024-08-24T00:19:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/54530/node/issues/54530"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:883d3e44-be93-c4f4-4e0b-678e28a78e87 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB7A:2B8B4B:D567C9:12404AA:6A4DE962 |
| html-safe-nonce | 40f988e329dac3af45b945c5ffbcf286ecbec4617f828fa92ffb62a49c258f97 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjdBOjJCOEI0QjpENTY3Qzk6MTI0MDRBQTo2QTRERTk2MiIsInZpc2l0b3JfaWQiOiIzMjAxODgwMzQ4Mzc2ODIwMDY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d824a5bde7a91b9617ef62889db5d5023d96e2319785d51bee9657e129132dd1 |
| hovercard-subject-tag | issue:2484067809 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/54530/issue_layout |
| twitter:image | https://opengraph.githubassets.com/97b0c2bdc0f51bc2b025419f44a32b9035546a86d77bbc9378759de04199cf5b/nodejs/node/issues/54530 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/97b0c2bdc0f51bc2b025419f44a32b9035546a86d77bbc9378759de04199cf5b/nodejs/node/issues/54530 |
| og:image:alt | I think the Node.js coverage reporter should include support for reporting statement coverage. My idea is to parse the source code into an Abstract Syntax Tree (AST) using acorn-walk, and then use ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | avivkeller |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width