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

coverage analysis of bundled code #1817

Open
Chris-Hibbert opened this issue Sep 24, 2020 · 2 comments
Open

coverage analysis of bundled code #1817

Chris-Hibbert opened this issue Sep 24, 2020 · 2 comments
Assignees
Labels
devex developer experience technical-debt tooling repo-wide infrastructure

Comments

@Chris-Hibbert
Copy link
Contributor

Describe the bug

The coverage tool NYC yarn test:nyc produces output that doesn't comport with reality.

To Reproduce

checkout on master, running in packages/zoe:

yarn test:nyc
produces
nyc-zoe

Expected behavior

I was a little suspicious of the last line, on zoeSeat.js. I set breakpoints on every basic block, and a few other lines, then ran under the debugger (in WebStorm, but your results should be consistent in any debugger.) I ran the tests test-zoeHelpersWZcf.js, and test-zcf.js, and hit every single breakpoint I had set.

Also notice that the line numbers given as "uncovered" in zoe.js mostly don't correspond to actual code.

@Chris-Hibbert Chris-Hibbert added the bug~deprecated use the new Bug issue type instead label Sep 24, 2020
@Chris-Hibbert Chris-Hibbert added the tooling repo-wide infrastructure label Sep 24, 2020
@Chris-Hibbert
Copy link
Contributor Author

The two tests I mentioned above are unit tests, not SwingSet tests. They do use bundleSource() (see .../zoe/test/unitTests/zcf/setupZcfTest.js).

@turadg turadg mentioned this issue Mar 21, 2023
mergify bot added a commit that referenced this issue Nov 23, 2024
_incidental_

## Description
The main change in this PR is to make the code coverage reports include files that aren't tested at all (or apparently aren't due to the bundling problem #1817)

It also cleans up a bunch of obsolete stuff about NESM and adds some more usage docs.

### Security Considerations
none

### Scaling Considerations
n/a

### Documentation Considerations
Improves

### Testing Considerations
I ran the commands locally to verify the reports. Once this lands they'll appear at https://agoric-sdk-coverage.netlify.app/

### Upgrade Considerations
n/a
@turadg turadg changed the title coverage results from NYC are unrelated to reality coverage analysis of bundled code Feb 7, 2025
@turadg turadg added technical-debt and removed bug~deprecated use the new Bug issue type instead labels Feb 7, 2025
@dckc
Copy link
Member

dckc commented Mar 10, 2025

endojs/endo#2719 could make this possible

cc @kriskowal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex developer experience technical-debt tooling repo-wide infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants