Skip to content

Test Coverage is Empty when Files are not in lib/ directory #2581

@stefanhk31

Description

@stefanhk31

After upgrading a Dart Frog project to version 1.28.0 of test, I noticed that coverage was not getting outputted for files in my routes directory--running coverage would produce an empty lcov.info file. When I rolled back to version 1.25.8, the lcov.info once again had data.

Dart SDK version: 3.9.0

Here is a repository with a minimal reproduction.

Steps:

  1. Download repository
  2. Run dart test -j 4 --coverage=coverage --platform=vm && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=foo and verify that coverage/lcov.info has data
  3. In pubspec.yaml, change test from 1.25.8 to 1.28.0
  4. Run dart pub get
  5. Run dart test -j 4 --coverage=coverage --platform=vm && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=foo, and see that coverage/lcov.info is now empty

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions