Skip to content

test: add unit tests for WebSocket and Redis adapters #488

@phoenix-server

Description

@phoenix-server

Summary

The adapters have very low unit test coverage. The WebSocket adapter is the core connection handler and Redis is used for pub/sub — both are critical paths.

Files to cover

  • src/adapters/web-socket-adapter.ts (26% statements, 2% branches)
  • src/adapters/web-socket-server-adapter.ts (55% statements, 8% branches)
  • src/adapters/redis-adapter.ts (6% statements)
  • src/adapters/web-server-adapter.ts (67% statements, 17% branches)

Out of scope

All files outside src/adapters/.

Acceptance criteria

  • Each adapter has a corresponding .spec.ts under test/unit/adapters/
  • WebSocket lifecycle events (open, message, close, error) covered
  • Redis pub/sub methods covered with a stubbed redis client
  • npm run cover:unit passes without regressions

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomershelp wantedExtra attention is neededtestUnit or integration test improvements

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions