dart_node_coverage 0.9.0-beta copy "dart_node_coverage: ^0.9.0-beta" to clipboard
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 #

  1. Analyze Dart source to identify executable lines
  2. Instrument source by inserting coverage probe calls
  3. Compile instrumented source with dart2js
  4. Execute tests in Node.js (coverage collected automatically)
  5. Generate LCOV report from coverage data

Status #

This package is in early development. The architecture is defined and implementation is in progress.

0
likes
130
points
123
downloads

Publisher

verified publisherchristianfindlay.com

Weekly Downloads

Coverage collection for Dart tests running on Node.js (dart2js)

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

analyzer, nadz, path

More

Packages that depend on dart_node_coverage