dart-add-unit-test

Originally fromdart-lang/skills
Installation
SKILL.md

Testing Dart and Flutter Applications

Contents

Structuring Test Files

Organize test files to mirror the lib directory structure to maintain predictability.

  • Place all test code within the test directory at the root of the package.
  • Append _test.dart to the end of all test file names (e.g., lib/src/utils.dart should be tested in test/src/utils_test.dart).
  • If writing integration tests, place them in an integration_test directory at the root of the package.

Writing Tests

Utilize package:test as the standard testing library for Dart applications.

Installs
1.1K
GitHub Stars
2.7K
First Seen
12 days ago
dart-add-unit-test — flutter/agent-plugins