kevmoo avatar

Dart Test Fundamentals

Covers the fundamentals of package:test in Dart: how to structure tests with test and group blocks, lifecycle methods like setUp and tearDown, and configuration through dart_test.yaml. The guidance on addTearDown versus try-finally for resource cleanup is solid and will prevent messy test code. It also includes practical naming conventions (like using PascalCase for class-based groups) and sensible advice about avoiding redundant wrapping. The note about not removing single groups during cleanup unless asked is refreshingly honest about diff churn. Use this when you're setting up test files from scratch or need to refactor an existing test suite's structure.

skills.sh installs
455
GitHub stars
148
last updated
Aug 21, 2026

Install

$ npx -y skills add kevmoo/dash_skills --skill dart-test-fundamentals --agent claude-code

Installs into .claude/skills of the current project.

Files

Dart Test Fundamentals

When to use this skill

Use this skill when:

  • Writing new test files.
  • Structuring test suites with group.
  • Configuring test execution via dart_test.yaml.
  • Understanding test lifecycle methods.

When NOT to use (Abstention Guardrails)

Do NOT apply this skill or refactor existing tests when:

  • Legacy Single-Group Churn: Do NOT remove or reformat existing group hierarchies in untouched existing tests unless explicitly asked, as this causes unwanted diff churn.
  • Alternative Assertion Frameworks: The package has migrated to package:checks or a specialized testing framework; do not revert tests back to legacy package:matcher idioms.
  • Trivial Tests with Zero Setup: Simple standalone tests with no shared state or resources do not need group, setUp, or addTearDown. Do not add ceremonial wrapper boilerplate.

Discovery

To find candidates for improving test structure:

try-finally Cleanup

Search for tests that use try-finally for cleanup instead of addTearDown:

  • Regex: \bfinally\s*\{ (Check if this is used for resource cleanup inside a test).

Core Concepts

Sponsors

Details

Repository
github.com/kevmoo/dash_skills
Category
Testing & QA
First seen
Jun 3, 2026

More from kevmoo/dash_skills

All 8
1aaronontheweb avatarakka-net-testing-patternsaaronontheweb/dotnet-skillsWrite unit and integration tests for Akka.NET actors using modern Akka.Hosting.TestKit patterns. Covers dependency injection, TestProbes, persistence testing, a431skills.sh installs
2mhattingpete avatartest-fixingmhattingpete/claude-skills-marketplaceRun tests and systematically fix all failing tests using smart error grouping. Use when user asks to fix failing tests, mentions test failures, runs test suite 386skills.sh installs
3levnikolaevich avatarln-404-test-executorlevnikolaevich/claude-code-skillsExecutes test tasks (label 'tests') through Todo to To Review with risk-based limits. Use for test task execution. Not for implementation tasks.378skills.sh installs
4levnikolaevich avatarln-635-test-isolation-auditorlevnikolaevich/claude-code-skillsAudits whether test results can be trusted: flakiness, isolation, real external dependencies, time/random/order dependency, and shared state. Use when auditing 376skills.sh installs
5levnikolaevich avatarln-633-test-value-auditorlevnikolaevich/claude-code-skillsScores each test by portfolio value and returns KEEP/DELETE/MERGE/REWRITE. Use when pruning test-suite cost.372skills.sh installs
6levnikolaevich avatarln-521-test-researcherlevnikolaevich/claude-code-skillsResearches real-world problems, competitor solutions, and customer complaints for a feature domain. Use before test planning to ground tests in actual user pain356skills.sh installs