SKILL19.3K installs530

Dart Add Unit Test

Write and organize unit tests for functions, methods, and classes using `package:test`. Use when creating new logic or fixing bugs to ensure code remains correct and regression-free.

Type
Skill
Author
dart-lang
Category
Testing
GitHub stars
530
Installs
19.3K
Last updated
October 16, 2026

Install

npx skills add https://github.com/dart-lang/skills --skill dart-add-unit-test

Use cases


Frequently Asked Questions

Which test package does this skill use?

It writes tests with package:test, so your Dart project needs that dependency already set up.

When should I run it?

Use it when adding new logic or fixing bugs, so changes stay covered against regressions.

Does it work for classes as well as functions?

Yes, it covers functions, methods, and classes.


About this skill

Writes and organizes unit tests for functions, methods, and classes using package:test. Use it when adding new logic or fixing bugs, so changes stay covered against regressions. It targets Dart projects already set up with package:test.

Summary written with AI assistance from the project's public description.


Categories


More from dart-lang


Similar Skills