Description
VS Code has APIs for providing code coverage during test runs (which will then be shown in the editor). I've a long-standing request to implement this in Dart-Code (Dart-Code/Dart-Code#2860).
I started looking at this today but found that dart test --coverage
and flutter test --coverage
are very different. Flutter takes a single filename (--coverage-path
) and produces data in the lcov
format, but Dart (or pkg:test
?) outputs a JSON format (which I'm not sure about - maybe is VM-specific?).
The docs for pkg:test say that the coverage can be converted with pkg:coverage
, but for Dart-Code this makes things much more complicated (I try to avoid just pub global activate
ing things on a users machine, and it adds another level of potential versioning that is different to the SDK).
It would be really nice if we could pass similar flags to dart test
and flutter test
that results in them producing the same format of output, in the same kind of location (eg. we can provide a filename or a folder to each).