跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Dart Checks Migration

技能 已验证 活跃

Replace the usage of `expect` and similar functions from `package:matcher` to `package:checks` equivalents.

目的

To guide developers in modernizing their Dart test suites by replacing outdated `expect` calls with the more robust `package:checks` equivalents.

功能

  • Detailed migration workflow
  • Strategies for discovering migration candidates
  • Comprehensive table of common `expect` to `check` pattern replacements
  • Specific guidance on handling async operations
  • Constraints for ensuring migration correctness

使用场景

  • Migrating existing test files from `package:matcher` to `package:checks`.
  • Replacing specific legacy matchers like `equals`, `isNull`, `isTrue`, `isFalse`.
  • Updating tests involving `throwsA` and custom matcher patterns.
  • Ensuring tests pass and code analyzes cleanly after migration.

非目标

  • Automated migration of custom matchers; manual review is required.
  • Migrating code outside of the `test/` directory or `pubspec.yaml`.
  • Fixing unrelated test failures or code quality issues.

安装

npx skills add flutter/skills

通过 npx 运行 Vercel skills CLI(skills.sh)— 需要本地安装 Node.js,以及至少一个兼容 skills 的智能体(Claude Code、Cursor、Codex 等)。前提是仓库遵循 agentskills.io 格式。

质量评分

已验证
98 /100
1 day ago 分析

信任信号

最近提交2 days ago
星标1.9k
许可证BSD-3-Clause
状态
查看源代码