agentsclimarketplace

Flutter testing

Skill Neznakometz/StackForge/mobile/skills/flutter-testing

Testing Flutter + Riverpod 3 — unit/widget/golden, ProviderContainer.test, provider overrides, mocktail. Apply when writing or reviewing tests in a Flutter project.From its SKILL.md

Install
npx -y skills add Neznakometz/StackForge --skill flutter-testing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.6 KB, 355 tokens by cl100k_base, as published. Nobody here has run it

Flutter + Riverpod 3 — testing

Tiers

  • unit (package:test, no Flutter) → widget (testWidgets, flutter_test) → integration (integration_test, device/emulator).
  • e2e/integration — only critical flows; everything else with unit tests (see the core skill tdd).

Riverpod

  • ProviderContainer.test() (v3, auto-disposes at the end). Do NOT share a container between tests.
  • Value: container.read(provider); for autoDispose — container.listen(...), read through the subscription.
  • Async: await expectLater(container.read(provider.future), completion(...)).
  • Widget: ProviderScope at the root of pumpWidget, container — tester.container().

Override (everything is mockable with no setup)

  • provider.overrideWith((ref) => fake);
  • notifierProvider.overrideWithBuild((ref, self) => state) — mock only build, real methods;
  • futureProvider.overrideWithValue(AsyncValue.data(x)).

Mocks

  • mocktail (no codegen) — default. Mock the repository that the Notifier uses, not the Notifier itself.
  • Golden: matchesGoldenFile('name.png'), update with flutter test --update-goldens. Run on a single CI image (goldens are sensitive to platform/fonts/version).

Accessibility in tests

meetsGuideline(textContrastGuideline), androidTapTargetGuideline/iOSTapTargetGuideline, labeledTapTargetGuideline — enforce contrast and tap-target size (48×48 Android / 44×44 iOS).

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.