
dart-add-unit-test
Write and organize unit tests for functions, methods, and classes
by dart-langFree
Description
dart-add-unit-test is an agent skill from the Dart team's skills collection, listed on skills.sh. It helps an AI agent write and organize unit tests for Dart and Flutter functions, methods and classes, using the package:test library. The skill is meant for creating new logic and for fixing bugs, so the code keeps working as it changes. It sets out a file layout: test files mirror the lib directory, so a file at lib/src/utils.dart is tested in test/src/utils_test.dart. All test code goes in the test directory at the root of the package, and each test file name ends in _test.dart. Integration tests go in a separate integration_test directory at the package root. The skill names package:test as the standard testing library for Dart applications, and it includes sections on executing tests, a test implementation workflow and examples. Keeping the layout predictable helps other developers find tests quickly. A skill is a SKILL.md file of instructions, sometimes with scripts and reference notes, that an AI agent loads only when a task calls for it. The skill is listed as free on skills.sh.…
Highlights
- Unit tests with package:test
- Test files mirror the lib directory
- Separate integration_test directory
- Covers Dart and Flutter code
Ratings & Reviews
No ratings yet
Be the first to rate dart-add-unit-test.
People also visit
dart-add-unit-test FAQ
What does the dart-add-unit-test skill do?
It helps an AI agent write and organize unit tests for Dart and Flutter code, using package:test.
How do I install it?
Run: npx skills add https://github.com/dart-lang/skills --skill dart-add-unit-test
Is it free?
Yes. The skill is listed as free on skills.sh.
Where do test files go?
In the test directory at the package root, mirroring lib, with names ending in _test.dart. Integration tests go in integration_test.
Which testing library does it use?
package:test, which the skill names as the standard testing library for Dart applications.
What are the best dart-add-unit-test alternatives?
Popular alternatives to dart-add-unit-test include flutter-testing-apps, flutter-testing and dart-collect-coverage. See all dart-add-unit-test alternatives

















