fix: update SpeechProvider tests for ElevenLabs API key integration#2135
Open
rustforrecess wants to merge 1 commit intocboard-org:masterfrom
Open
fix: update SpeechProvider tests for ElevenLabs API key integration#2135rustforrecess wants to merge 1 commit intocboard-org:masterfrom
rustforrecess wants to merge 1 commit intocboard-org:masterfrom
Conversation
- Add missing ElevenLabs fields to reducer test initialState - Add CHANGE_ELEVENLABS_API_KEY test to reducer tests - Mock tts module in actions tests to fix store.getState() crash - Mock window.speechSynthesis for JSDOM compatibility - Update changeVoice test to use mockStore dispatch (now a thunk) - Add changeElevenLabsApiKey action test Closes cboard-org#2052 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes failing SpeechProvider tests after the ElevenLabs API key integration (#2052).
initialStateto include the 5 new fields added by the ElevenLabs integration (elevenLabsApiKey,elevenLabsVoiceSettings, and three newoptionsfields). Added test case forCHANGE_ELEVENLABS_API_KEYaction.ttsmodule to fix thestore.getState()crash (tts now depends on the Redux store). Mockedwindow.speechSynthesisfor JSDOM compatibility. UpdatedchangeVoicetest to usemockStoredispatch since it was refactored into a thunk. Added test forchangeElevenLabsApiKeyaction creator.Test plan
npx react-scripts test --watchAll=false --testPathPattern=Speech— all 3 suites should pass (20 tests)Closes #2052
🤖 Generated with Claude Code