Skip to content

Add tests for splitTextIntoSentences#218

Open
ysdede wants to merge 1 commit into
masterfrom
add-tests-split-text-into-sentences-5434716196038362840
Open

Add tests for splitTextIntoSentences#218
ysdede wants to merge 1 commit into
masterfrom
add-tests-split-text-into-sentences-5434716196038362840

Conversation

@ysdede
Copy link
Copy Markdown
Owner

@ysdede ysdede commented May 28, 2026

What: The testing gap addressed: Missing tests for splitTextIntoSentences in src/sentence_boundary.js.
Coverage: Tests now cover happy paths (splitting typical sentences with winkNLP), edge cases (empty strings, null, undefined, whitespace-only strings), and fallback behavior for heuristic splitting when config.useNLP === false.
Result: Increased test coverage and confidence in sentence boundary detection logic across both execution paths (NLP and RegEx heuristics).


PR created automatically by Jules for task 5434716196038362840 started by @ysdede

Summary by Sourcery

Tests:

  • Add unit tests for splitTextIntoSentences covering typical inputs, edge cases, and non-NLP fallback behavior.

Added comprehensive tests for the `splitTextIntoSentences` function in `src/sentence_boundary.js`. Coverage includes happy paths for normal NLP usage, testing the fallback to heuristic chunking when `useNLP: false`, and verifying edge cases such as empty, null, or undefined strings.
@google-labs-jules

This comment has been minimized.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ysdede ysdede changed the title 🧪 [Add tests for splitTextIntoSentences] [Add tests for splitTextIntoSentences] May 29, 2026
@ysdede ysdede changed the title [Add tests for splitTextIntoSentences] Add tests for splitTextIntoSentences May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant