Context
Testing Electric apps requires different strategies for unit tests (mocked fetch) vs integration tests (real Electric server + Postgres). The integration test setup involves Docker, multiple services, and specific configuration.
Scope
Create an electric-testing skill covering:
- Unit testing — Mocking
fetchClient with vi.fn(), testing collection behavior without network
- Integration test setup — Docker Compose for Postgres + Electric + nginx, port configuration
- Building local Electric image — When to use canary vs local build
- Test database management — Schema setup, teardown, test isolation
- Testing patterns — Testing optimistic mutations, testing live query reactivity, testing error recovery
- CI configuration — GitHub Actions / similar with Electric services
Source
Identified during domain discovery skill test run. Integration test setup is a distinct developer task with non-trivial infrastructure.
Context
Testing Electric apps requires different strategies for unit tests (mocked fetch) vs integration tests (real Electric server + Postgres). The integration test setup involves Docker, multiple services, and specific configuration.
Scope
Create an
electric-testingskill covering:fetchClientwithvi.fn(), testing collection behavior without networkSource
Identified during domain discovery skill test run. Integration test setup is a distinct developer task with non-trivial infrastructure.