dart-migrate-to-checks-package

Migrate Dart test assertions from package:matcher to package:checks syntax.

Updated Jun 26, 2026
One-click install
npx skills add https://github.com/yash-garg/pi-config --skill dart-migrate-to-checks-package-yash-garg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dart-migrate-to-checks-package
Source: https://github.com/yash-garg/pi-config/tree/main/skills/dart-migrate-to-checks-package
Command: npx skills add https://github.com/yash-garg/pi-config --skill dart-migrate-to-checks-package-yash-garg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers replace legacy package:matcher assertions with package:checks equivalents, reducing migration effort while improving type safety, autocomplete, and test diagnostics.

Core Features & Use Cases

  • Assertion Migration Guidance: Converts expect, expectLater, and matcher-based assertions into package:checks check syntax.
  • Migration Pitfall Handling: Explains collection equality, async throws, regex matching, nullable booleans, map keys, and other compatibility differences.
  • Use Case: When upgrading a Dart test suite, use this Skill to systematically identify legacy assertions and rewrite them into modern package:checks patterns while preserving behavior.

Quick Start

Ask the skill to migrate a Dart test file from package:matcher assertions to package:checks syntax and verify the converted expectations.

Frequently Asked Questions about dart-migrate-to-checks-package

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Dart test assertions from package:matcher to package:checks?

To migrate Dart test assertions, convert legacy expect and expectLater calls into type-safe package:checks syntax. This process systematically identifies matcher-based assertions and rewrites them into modern check patterns while preserving behavior.

What are the common pitfalls when modernizing Dart tests to package:checks?

Common migration pitfalls when modernizing Dart tests include handling collection equality, async throws, regex matching, nullable booleans, and map keys. Addressing these compatibility differences ensures correct assertion refactoring from package:matcher to package:checks.

Does package:checks offer better type safety than package:matcher for Dart tests?

Yes, package:checks provides better type safety, improved autocomplete, and enhanced test diagnostics compared to package:matcher. Adopting package:checks reduces migration effort and modernizes Dart test assertions with safer check syntax.

How do I handle async throws and collection equality when converting to package:checks?

When converting to package:checks, handle async throws and collection equality by applying specific compatibility transformations. The migration addresses these edge cases to ensure legacy matcher assertions are rewritten into correct, type-safe check equivalents.

Can I automatically refactor expect calls in my Dart test suite to use check syntax?

Yes, you can refactor expect calls by applying type-safe assertion transformations from package:matcher to package:checks. This migration systematically identifies legacy assertions and rewrites them into modern package:checks patterns while verifying the converted expectations.