composable-svelte-testing

Validate Composable Svelte business logic with TestStore send/receive patterns.

3|Updated Oct 26, 2025
One-click install
npx skills add https://github.com/jonathanbelolo/composable-svelte --skill composable-svelte-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: composable-svelte-testing
Source: https://github.com/jonathanbelolo/composable-svelte/tree/main/.claude/skills/composable-svelte-testing
Command: npx skills add https://github.com/jonathanbelolo/composable-svelte --skill composable-svelte-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Testing patterns for Composable Svelte enable teams to validate business logic without UI integration, ensuring reducers and effects behave deterministically.

Core Features & Use Cases

  • Exhaustive state testing with TestStore's send/receive pattern.
  • Mock dependencies (API, clocks, websockets) to simulate real-world scenarios.
  • Guidance on composing reducers, testing nested scopes, and validating side effects.

Quick Start

Install the testing utilities and write a simple TestStore-based test:

  • Create a TestStore with an initial state, reducer, and mocked dependencies.
  • Dispatch actions with store.send and assert intermediate state.
  • Handle effect outputs with store.receive and assert final state.
  • Call store.finish() to ensure there are no pending actions.

Frequently Asked Questions about composable-svelte-testing

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

FAQPage Schema
How do I test reducers and effects in Composable Svelte without UI integration?

Mock dependencies like APIs, clocks, and websockets in your Composable Svelte tests by injecting them into the TestStore. This simulates real-world scenarios and ensures side effects are validated deterministically without external calls.

How do I mock API and websocket dependencies when testing Composable Svelte stores?

Mock dependencies like APIs, clocks, and websockets in your Composable Svelte tests by injecting them into the TestStore. This simulates real-world scenarios and ensures side effects are validated deterministically without external calls.

What is the send receive finish pattern for exhaustive store testing?

The send, receive, and finish pattern is a structured testing flow for TestStore. You dispatch actions with send, handle effect outputs with receive to assert state, and call finish to ensure no pending actions remain.

Can I test nested scopes and composed reducers in Composable Svelte applications?

Yes, you can test nested scopes and composed reducers in Composable Svelte applications. The testing patterns guide you through validating composed reducers and side effects across typical feature work like forms and navigation.

How do I ensure there are no pending actions after testing a Svelte store?

To ensure there are no pending actions after testing a Svelte store, call store.finish() at the end of your test. This enforces disciplined testing patterns and verifies all dispatched actions and effects have resolved.