Files
pubsub/tasks/017-integration-test-pubsub-with-redis.md

43 lines
1.2 KiB
Markdown

---
id: integration-test-pubsub-with-redis
name: "Integration test: createPubSub with Redis event target"
status: pending
depends_on: [redis-adapter-tests, core-pubsub-tests]
scope: narrow
risk: low
impact: component
level: implementation
---
## Description
Test that `createPubSub` works correctly when configured with the Redis event target. This is an integration test that verifies the core factory and the adapter work together:
```ts
const pubsub = createPubSub<MyEventMap>({
eventTarget: createRedisEventTarget({ publishClient, subscribeClient }),
});
```
This tests the full round-trip: publish through createPubSub → dispatch through Redis → receive on the other side.
## Acceptance Criteria
- [ ] Integration test: publish via `createPubSub` + Redis event target
- [ ] Integration test: subscribe via `createPubSub` + Redis event target
- [ ] Integration test: full envelope round-trip (type, id, payload)
- [ ] Integration test: topic scoping works with `type:id` through Redis
- [ ] Integration test: channel prefix is correctly applied when configured
## References
- docs/architecture/event-targets/redis.md
- docs/architecture/api-surface.md
## Notes
> To be filled by implementation agent
## Summary
> To be filled on completion