dart-generate-test-mocks
dart generate test mocks
Claude Code
What it does
- Structuring Code for Testability
- Managing Dependencies
- Generating Mocks
- Implementing Unit Tests
- Workflow: Creating and Running Mocked Tests
- Inject external services (e.g., http.Client) through class constructors.
- Represent URLs strictly as Uri objects using Uri.parse(string).
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
dart-generate-test-mocks FAQ
What does the dart-generate-test-mocks skill do?
Define and generate mock objects for external dependencies using `package:mockito` and `build_runner`. Use when unit testing classes that depend on complex external services like APIs or databases. Structuring Code for Testability Managing Dependencies
How do I install dart-generate-test-mocks?
Run: npx -y skills add https://github.com/dart-lang/skills --skill dart-generate-test-mocks --agent claude-code — the source lives at github.com/dart-lang/skills.
Maintain dart-generate-test-mocks?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/dart-lang-skills-dart-generate-test-mocks?ref=badge) npx agentictools info skills/dart-lang-skills-dart-generate-test-mocks The second line is the CLI lookup for this page — handy in READMEs and docs.