Code coverage collection for Dart code compiled with dart2js and executed in Node.js.
This package provides compile-time instrumentation for Dart source code to enable line coverage tracking when running tests in Node.js via dart2js.
See lib/src/architecture.dart for detailed architecture documentation.
- Compile-time instrumentation: Insert coverage probes before dart2js compilation
- LCOV output: Standard format compatible with genhtml, coveralls, etc.
- Integration with dart test: Works with existing test workflows
- Zero runtime overhead when disabled: No cost without instrumentation
- Analyze Dart source to identify executable lines
- Instrument source by inserting coverage probe calls
- Compile instrumented source with dart2js
- Execute tests in Node.js (coverage collected automatically)
- Generate LCOV report from coverage data
This package is in early development. The architecture is defined and implementation is in progress.