其他

dart-collect-coverage

flutter/agent-plugins

Collect coverage using the coverage packge and create an LCOV report

这个 Skill 和 dart-lang/skills/dart-collect-coverage 内容相同,那边的安装量更高,建议优先选用。

  • 1.5万 次安装
  • 3100 星标
  • 收录于

安装命令

npx skills add https://github.com/flutter/agent-plugins --skill dart-collect-coverage

SKILL.md

Implementing Dart and Flutter Test Coverage

Contents

Testing Fundamentals

Structure your test suites using the standard Dart testing paradigms. Use package:test for Dart projects and flutter_test for Flutter projects.

  • Unit Tests: Verify individual functions, methods, or classes.
  • Component/Widget Tests: Verify component behavior, layout, and interaction using mock objects (package:mockito).
  • Integration Tests: Verify entire app flows on simulated or real devices.

Coverage Directives

Exclude specific lines, blocks, or entire files from coverage metrics using inline comments. Pass the --check-ignore flag during formatting to enforce these directives.

Implementing Dart and Flutter Test Coverage

Contents

Testing Fundamentals

Structure your test suites using the standard Dart testing paradigms. Use package:test for Dart projects and flutter_test for Flutter projects.

  • Unit Tests: Verify individual functions, methods, or classes.
  • Component/Widget Tests: Verify component behavior, layout, and interaction using mock objects (package:mockito).
  • Integration Tests: Verify entire app flows on simulated or real devices.

Coverage Directives

Exclude specific lines, blocks, or entire files from coverage metrics using inline comments. Pass the --check-ignore flag during formatting to enforce these directives.