Skip to content

fix(test/coverage): exclude test files #18748

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

Merged
merged 4 commits into from
Apr 19, 2023

Conversation

levex
Copy link
Contributor

@levex levex commented Apr 18, 2023

Fixes: #18454

@@ -602,7 +604,8 @@ fn filter_coverages(
|| e.url.starts_with(npm_root_dir)
|| e.url.ends_with("__anonymous__")
|| e.url.ends_with("$deno$test.js")
|| e.url.ends_with(".snap");
|| e.url.ends_with(".snap")
|| is_supported_test_ext(Path::new(e.url.as_str()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to use if Ok(path) = e.url.to_file_path() here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.url is a String - so this won't work?

@levex levex force-pushed the coverage_better_pattern branch from 0b82063 to abe9f4c Compare April 19, 2023 14:40
@levex levex requested a review from bartlomieju April 19, 2023 19:24
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work

@levex levex merged commit c336755 into denoland:main Apr 19, 2023
@levex levex deleted the coverage_better_pattern branch April 19, 2023 21:30
bartlomieju pushed a commit to bartlomieju/deno that referenced this pull request Apr 20, 2023
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.

deno coverage default exclude pattern should be better
2 participants