dart-add-unit-test 是做什么的?
使用 package:test 为函数、方法和类编写和组织单元测试。在创建新逻辑或修复错误时使用,以确保代码的正确性并避免回归。
使用 `package:test` 为函数、方法和类编写和组织单元测试。在创建新逻辑或修复错误时使用,以确保代码的正确性并避免回归。
此技能专为 Dart 开发者设计,用于高效编写和组织单元测试。它基于 `package:test` 框架,支持为函数、方法或类快速生成测试用例,适用于新功能开发或 Bug 修复场景。其核心价值在于通过自动化测试维护代码质量,减少回归错误。该技能可在多种 AI 编码助手(如 Claude Code 等)中使用,通过遵循 Dart 社区最佳实践,帮助开发者快速建立测试覆盖。工作流程包括解析目标代码结构、生成测试骨架、填充断言逻辑,并支持组织测试文件,从而简化测试驱动开发(TDD)流程。
npx skills add https://github.com/dart-lang/skills/tree/main/skills/dart-add-unit-testInstalled? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →
使用 package:test 为函数、方法和类编写和组织单元测试。在创建新逻辑或修复错误时使用,以确保代码的正确性并避免回归。
This repo contains 8 individual skills — each has its own dedicated page.
Entrypoint structure, exit codes, cross-platform scripts. Use when building command line utilities, scripts, or applications.
Collect coverage using the coverage packge and create an LCOV report
Uses get_runtime_errors and lsp to fetch an active stack trace, locate the failing line, apply a fix, and verify resolution via hot_reload.
Define and generate mock objects for external dependencies using `package:mockito` and `build_runner`. Use when unit testing classes that depend on complex external services like APIs or databases.
Replace the usage of `expect` and similar functions from `package:matcher` to `package:checks` equivalents.
Workflow for fixing package version conflicts. Use this when `pub get` fails due to incompatible package versions.
Execute `dart analyze` to identify warnings and errors, and use `dart fix --apply` to automatically resolve mechanical lint issues. Use during development to ensure code quality and before committing changes.
Use switch expressions and pattern matching where appropriate
Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.
Control Eight Sleep pods (status, temperature, alarms, schedules).
BluOS CLI (blu) for discovery, playback, grouping, and volume.
Create, search, and manage Bear notes via grizzly CLI.
Capture frames or clips from RTSP/ONVIF cameras.
Search GIF providers with CLI/TUI, download results, and extract stills/sheets.