Skip to content

Add stt utils tests#2359

Open
Divyansh1552005 wants to merge 2 commits intoarc53:mainfrom
Divyansh1552005:add-stt-utils-tests
Open

Add stt utils tests#2359
Divyansh1552005 wants to merge 2 commits intoarc53:mainfrom
Divyansh1552005:add-stt-utils-tests

Conversation

@Divyansh1552005
Copy link
Copy Markdown

  • What kind of change does this PR introduce?
    Tests

  • Why was this change needed?
    Several internal Speech-to-Text (STT) utility helper functions were not directly covered by unit tests. These functions are critical for text normalization, prefix matching, overlap detection, and commit logic used in live transcription stabilization.

Adding dedicated tests improves reliability, prevents regressions, and increases confidence in core STT processing logic.

  • Other information

What changed:

  • Added unit tests for:
    • _normalize_word
    • _split_words
    • _common_prefix_length
    • _find_suffix_prefix_overlap
    • _calculate_commit_count
  • Covered edge cases such as:
    • Empty and whitespace-only inputs
    • Case-insensitive matching
    • Special character normalization
    • Prefix matching correctness
    • Overlap thresholds
    • Commit behavior under normal and silence conditions

Tests / validation:

  • All tests pass successfully
  • Coverage maintained at a high level

Test results:
TOTAL 16825 560 97%
Coverage HTML written to dir htmlcov
Coverage XML written to file coverage.xml
======================== 4892 passed, 2 skipped, 2 warnings in 180.86s (0:03:00) =========================

Notes for reviewers:

  • This PR focuses only on adding missing unit test coverage for internal helper functions
  • No changes were made to existing logic or behavior
  • Improves test depth without affecting existing functionality

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 4, 2026

@Divyansh1552005 is attempting to deploy a commit to the Arc53 Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the tests Tests label Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant