Skip to content
D

dart-generate-test-mocks

Define and generate mock objects for external dependencies

by dart-langFree

#4229in AI Skills
0In stores

Description

dart-generate-test-mocks is an agent skill from the Dart team's skills collection, listed on skills.sh. It helps an AI agent define and gene…

Highlights

  • Generates mocks with mockito and build_runner
  • Constructor injection guidance
  • Interfaces for external services
  • Workflow for mocked unit tests

Ratings & Reviews

No ratings yet

Be the first to rate dart-generate-test-mocks.

People also visit

D

dart-add-unit-test

Write and organize unit tests for functions, methods, and classes

AI Skills
Get
U

unit-test-service-layer

Provides patterns for unit testing service layer with Mockito

AI Skills
Get
F

flutter-testing-apps

Implements unit, widget, and integration tests for a Flutter app

AI Skills
Get
W

wiremock-standalone-docker

Provides patterns and configurations

AI Skills
Get
T

test-master

Generates test files, creates mocking strategies, analyzes code coverage

AI Skills
Get
D

dart-migrate-to-checks-package

Replace the usage of `expect` and similar functions from `package:matcher`

AI Skills
Get

dart-generate-test-mocks FAQ

What does the dart-generate-test-mocks skill do?

It helps an AI agent define and generate mock objects for a Dart class's external dependencies for unit tests.

How do I install it?

Run: npx skills add https://github.com/dart-lang/skills --skill dart-generate-test-mocks

Is it free?

Yes. The skill is listed as free on skills.sh.

Which tools does it use?

package:mockito for mocks and build_runner to generate them.

How should my code be structured?

The skill says to inject external services through constructors and define clear interfaces, so they can be replaced by mocks.

What are the best dart-generate-test-mocks alternatives?

Popular alternatives to dart-generate-test-mocks include dart-add-unit-test, unit-test-service-layer and flutter-testing-apps. See all dart-generate-test-mocks alternatives

Developer Stuff

Badges