test(src/lib): 2c - add tests for untested modules - #136
Draft
sukhada wants to merge 1 commit into
Draft
Conversation
sukhada
force-pushed
the
claude/lib-cleanup-2b
branch
from
March 21, 2026 23:55
a3e884c to
3c39955
Compare
sukhada
force-pushed
the
claude/lib-cleanup-2c
branch
from
March 21, 2026 23:55
2b8d176 to
149efc2
Compare
New test files for previously untested modules: - phone-format.spec.ts: getFormattedPhoneNumber, phoneNumberRegex - permissions.spec.ts: all exported role functions, documents getHighestRole input mutation bug - attributes.spec.ts: camelCase, titleCase, snakeToTitleCase, nameComponents, recordToCamelCase - datetime.spec.ts: parseIanaZone, deprecatedTimezoneMap, DateTime.setZone Expanded existing test files: - tz-helpers.spec.ts: added isValidTimezone and asUtc tests - interaction-step-helpers.spec.ts: added interactionStepForId (documents last-match behavior) and getTopMostParent tests - utils.spec.ts: added edge cases for stringIsAValidUrl, replaceAll, asPercent, asPercentWithTotal Total: 105 tests passing, 2 skipped (known zip-format bugs). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
sukhada
force-pushed
the
claude/lib-cleanup-2c
branch
from
March 22, 2026 00:05
149efc2 to
de3d496
Compare
3 tasks
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
Phase 2C of the src/lib/ modernization. Adds test coverage for previously untested modules and expands thin existing test files. Purely additive — documents current behavior as a safety net before refactoring in later PRs.
New test files (4):
phone-format.spec.ts—getFormattedPhoneNumber,phoneNumberRegexpermissions.spec.ts— all role functions, documentsgetHighestRoleinput mutation bugattributes.spec.ts—camelCase,titleCase,snakeToTitleCase,nameComponents,recordToCamelCasedatetime.spec.ts—parseIanaZone,deprecatedTimezoneMap,DateTime.setZoneExpanded existing files (3):
tz-helpers.spec.ts— addedisValidTimezoneandasUtcinteraction-step-helpers.spec.ts— addedinteractionStepForId(documents last-match behavior) andgetTopMostParentutils.spec.ts— added edge cases for URL validation, replaceAll, percentagesStacked on: #135
Test plan
Generated with Claude Code