setup-test

Reset bloc_superpowers state between Dart and Flutter tests using Superpowers.clear().

7|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/marcglasberg/bloc_superpowers --skill setup-test
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: setup-test
Source: https://github.com/marcglasberg/bloc_superpowers/tree/main/.claude/skills/setup-test
Command: npx skills add https://github.com/marcglasberg/bloc_superpowers --skill setup-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creates a consistent, repeatable test setup for Cubits using bloc_superpowers by ensuring state is reset between tests and providing deterministic async control.

Core Features & Use Cases

  • Enforces test isolation by invoking Superpowers.clear() in setUp to reset state between tests.
  • Guides testing of loading and error states with Completers to control asynchronous flows.
  • Demonstrates a complete testing pattern with common utilities (bloc_test, mocktail) and proper setup/teardown.

Quick Start

In your test suite, call setUp to reset Superpowers state between tests using Superpowers.clear().

Frequently Asked Questions about setup-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reset Cubit state between Flutter tests to fix flaky tests?▼

Reset Cubit state between tests to fix flaky results by invoking Superpowers.clear() inside the setUp block, which ensures a clean environment before each test case executes.

How do I test loading and error states for Cubits using Completers?▼

Testing loading and error states for Cubits requires using Completers to control asynchronous flows, allowing you to deterministically trigger and verify specific states during your test suite execution.

How do I use setUp and tearDown patterns for reproducible Dart test environments?▼

Establish reproducible Dart test environments by implementing proper setUp and tearDown patterns, utilizing Superpowers.clear() to reset state and ensure consistent test isolation throughout your suite.

Can I use mocktail and bloc_test to test Cubit async flows?▼

Yes, you can test Cubit async flows using common utilities like bloc_test and mocktail alongside Completers, integrating them with proper setup and teardown patterns for deterministic testing.

Does bloc_superpowers support integration-style tests for loading states?▼

Yes, bloc_superpowers supports integration-style tests for loading states by providing standardized test setup utilities that reset state and use Completers for deterministic asynchronous flow control.