What problem does it solve?
This Skill provides expert testing guidance for Composable Rust applications, helping developers write fast unit tests for reducers, set up reliable integration tests with real dependencies, and leverage a rich set of test utilities such as TestStore, FixedClock, mocks, and property-based testing patterns.
Core Features & Use Cases
- Unit testing reducers: Pure, deterministic tests that exercise state transitions without I/O, using patterns like the ReducerTest builder and in-file #[cfg(test)] modules.
- Integration testing with real dependencies: End-to-end validation using real components (e.g., PostgreSQL, message buses) via testcontainers, migrations, and realistic environments.
- Test utilities & patterns: Guided use of TestStore, FixedClock, mocks, and saga-wait patterns to deterministically drive async work and verify outcomes.
- Property-based testing & async patterns: Property tests with proptest to uncover edge cases; asynchronous tests with #[tokio::test].
Quick Start
Use the composable-rust-testing skill to write unit and integration tests by leveraging ReducerTest, TestStore, and FixedClock in your Rust project. For example, create a test environment, initialize a reducer and state, invoke reduce, and assert on resulting state and effects.