Skip to content

Conversation

@liamappelbe
Copy link
Contributor

Fixes dart-lang/tools#2269

The bug is that when dart test --coverage... is run in a package that's part of a workspace, the default coverage filter is set to the name of the workspace, rather than the package under test. In package:coverage I solved this by searching for all the nested packages, and using those as the default filter. Another approach would be to restrict the default filter to only include the package under test, but I think users are more likely to want all the workspace's packages included in the report.

This change introduces a dependency on package:pubspec_parse. Hopefully that's ok.

@liamappelbe liamappelbe requested a review from a team as a code owner December 5, 2025 01:20
@liamappelbe liamappelbe requested a review from natebosch December 5, 2025 01:22
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

PR Health

Changelog Entry
Package Changed Files
package:test_core pkgs/test_core/lib/src/runner/vm/platform.dart
pkgs/test_core/lib/src/util/package_config.dart
pkgs/test_core/pubspec.yaml

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test coverage without --coverage-package doesn't work correctly (in pub workspaces?)

1 participant