test: consolidate regex/patterns/findMatches tests into index.test.ts - #9
Merged
Conversation
The three test files had grown overlapping/redundant coverage: most of regex.test.ts's individual case list (single-pattern checks like "うおw") duplicated what the per-pattern loop in patterns.test.ts already verifies more precisely (tied to the pattern's own id). Consolidated into one test/index.test.ts: - findAll/contains: kept only the scenarios not covered elsewhere (basic smoke check, the (笑)-with-stem regression, multi-pattern findAll matching, and argument validation - the last of these wasn't tested anywhere before) - findMatches: unchanged, moved as-is - パターン別サンプル: the auto-generated per-pattern loop, now also asserting findMatches returns the same pattern id for each sample (so both the combined-regex path and the per-pattern-regex path are exercised) Net effect: 3 files / ~120 tests with real duplication -> 1 file / 140 tests with each one covering something the others don't.
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.
The three test files had grown overlapping/redundant coverage: most of regex.test.ts's individual case list (single-pattern checks like "うおw") duplicated what the per-pattern loop in patterns.test.ts already verifies more precisely (tied to the pattern's own id). Consolidated into one test/index.test.ts:
Net effect: 3 files / ~120 tests with real duplication -> 1 file / 140 tests with each one covering something the others don't.