⚙️ [Improvement]: Add regression coverage for failed voice connection startup #70

Closed
opened 2026-06-22 09:43:52 +00:00 by FrauJulian · 0 comments
FrauJulian commented 2026-06-22 09:43:52 +00:00 (Migrated from github.com)

Description

The current AudioManager tests cover the happy path for connect() and several playback state transitions, but they do not cover a failed entersState() call during connection startup.

That path is important because connect() sets state to connecting, creates a voice connection, subscribes the audio player, and then awaits readiness. A regression test should pin the behavior when readiness fails or times out.

Acceptance Criteria

  • Add a focused Jest test where entersState() rejects.
  • Assert the observable state/resource behavior after the failed connect() attempt.
  • Keep the test local to tests/audio-manager.test.ts; no new dependencies.
### Description The current `AudioManager` tests cover the happy path for `connect()` and several playback state transitions, but they do not cover a failed `entersState()` call during connection startup. That path is important because `connect()` sets state to `connecting`, creates a voice connection, subscribes the audio player, and then awaits readiness. A regression test should pin the behavior when readiness fails or times out. ### Acceptance Criteria - Add a focused Jest test where `entersState()` rejects. - Assert the observable state/resource behavior after the failed `connect()` attempt. - Keep the test local to `tests/audio-manager.test.ts`; no new dependencies.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: fraujulian/Discord-Audio-Stream#70