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

deno coverage default exclude pattern should be better #18454

Closed
loynoir opened this issue Mar 27, 2023 · 1 comment · Fixed by #18748
Closed

deno coverage default exclude pattern should be better #18454

loynoir opened this issue Mar 27, 2023 · 1 comment · Fixed by #18748
Assignees
Labels
breaking change a change or feature that breaks existing semantics suggestion suggestions for new features (yet to be agreed) testing related to deno test and coverage

Comments

@loynoir
Copy link

loynoir commented Mar 27, 2023

Brief

By default, deno coverage contains XXX.test.mts and npm:XXX.

Reproduce

$ deno test --coverage=cov_profile path/to/source/

test files are in pattern XXX.test.mts

Actual

  • deno coverage default exclude pattern is not superset of deno test default autoscan pattern.
  • deno coverage contains npm:XXX
$ deno coverage build/cov_profile --lcov | grep SF:
SF:/home/vscode/.cache/deno/npm/registry.npmjs.org/XXX
SF:/path/to/source/foo.mts
SF:/path/to/source/foo.test.mts
SF:/path/to/source/bar.mts
SF:/path/to/source/bar.test.mts

Expected

  • deno coverage default exclude pattern is superset of deno test default autoscan pattern
  • deno coverage not contains npm:XXX
$ deno coverage build/cov_profile --lcov --exclude='\\.test\\.'  --exclude=/npm/| grep SF:
SF:/path/to/source/foo.mts
SF:/path/to/source/bar.mts

Additional

deno coverage may have broken pipe.

$ deno coverage build/cov_profile --lcov | grep -qF /npm/
error: Broken pipe (os error 32)
@loynoir loynoir changed the title deno coverage default exclude pattern should be superset of deno test default autoscan pattern deno coverage default exclude pattern should be better Mar 27, 2023
dsherret pushed a commit that referenced this issue Mar 30, 2023
Fixes #17664 and part of
#18454 by excluding files
belonging to npm modules by default in the coverage output.
mmastrac pushed a commit that referenced this issue Mar 31, 2023
Fixes #17664 and part of
#18454 by excluding files
belonging to npm modules by default in the coverage output.
@aapoalas aapoalas added suggestion suggestions for new features (yet to be agreed) breaking change a change or feature that breaks existing semantics testing related to deno test and coverage labels Apr 15, 2023
@levex levex self-assigned this Apr 18, 2023
@levex
Copy link
Contributor

levex commented Apr 18, 2023

#18748

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change a change or feature that breaks existing semantics suggestion suggestions for new features (yet to be agreed) testing related to deno test and coverage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants