
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-codeInstalls 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
grouphierarchies in untouched existing tests unless explicitly asked, as this causes unwanted diff churn. - Alternative Assertion Frameworks: The package has migrated to
package:checksor a specialized testing framework; do not revert tests back to legacypackage:matcheridioms. - Trivial Tests with Zero Setup: Simple standalone tests with no shared
state or resources do not need
group,setUp, oraddTearDown. 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