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

try reproducing incorrect coverage when loading querystring #501

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

iambumblehead
Copy link

@iambumblehead iambumblehead commented Nov 21, 2023

This PR attempts to reproduce inaccurate coverage results described here #325 cc @koshic @coderaiser @shnhrrsn

update (success): to reproduce the error with this branch, run npm run test-loader The error is not reproduced when all tests run together, as in npm run test so a separate npm run test-loader command is added to reproduce the issue.

--------------|---------|----------|---------|---------|-------------------
File          | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
--------------|---------|----------|---------|---------|-------------------
All files     |   82.14 |       80 |      50 |   82.14 |                   
 vanilla      |     100 |      100 |     100 |     100 |                   
  loaded.js   |     100 |      100 |     100 |     100 |                   
  main.js     |     100 |      100 |     100 |     100 |                   
 vanilla/dir  |       0 |        0 |       0 |       0 |                   
  unloaded.js |       0 |        0 |       0 |       0 | 1-5               
--------------|---------|----------|---------|---------|-------------------

@iambumblehead
Copy link
Author

for convenience, the vanilla directory at the PR is linked here

c8火$ tree test/fixtures/all/vanilla/
test/fixtures/all/vanilla/
├── dir
│   └── unloaded.js
├── loaded.js
├── main.js
└── main.querystring-import.mjs

2 directories, 4 files

@iambumblehead
Copy link
Author

iambumblehead commented Nov 21, 2023

Experimenting a little big creates a situation that reproduces the error. At this PR, comment-out all other tests in "./test/integration.js" and the coverage error occurs

--------------|---------|----------|---------|---------|-------------------
File          | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
--------------|---------|----------|---------|---------|-------------------
All files     |   82.14 |       75 |      50 |   82.14 |                   
 vanilla      |     100 |      100 |     100 |     100 |                   
  loaded.js   |     100 |      100 |     100 |     100 |                   
  main.js     |     100 |      100 |     100 |     100 |                   
 vanilla/dir  |       0 |        0 |       0 |       0 |                   
  unloaded.js |       0 |        0 |       0 |       0 | 1-5               
--------------|---------|----------|---------|---------|-------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants