dart_node_coverage 0.9.0-beta
dart_node_coverage: ^0.9.0-beta copied to clipboard
Coverage collection for Dart tests running on Node.js (dart2js)
dart_node_coverage #
Code coverage collection for Dart code compiled with dart2js and executed in Node.js.
Architecture #
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.
Key Features #
- 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
How It Works #
- 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
Status #
This package is in early development. The architecture is defined and implementation is in progress.