Skip to content

fix: resolve all failing tests in TypeScript utility library#190

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2401-1780245333
Open

fix: resolve all failing tests in TypeScript utility library#190
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2401-1780245333

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented May 31, 2026

Summary

  • calculator.ts: Added division-by-zero guard that throws an Error when b === 0
  • string-utils.ts: Fixed wordCount to handle multiple consecutive spaces; implemented truncate with word-boundary-aware ellipsis
  • task-manager.ts: Implemented remove, update, and sortBy methods
  • date-utils.ts: Changed Math.floor to Math.round in formatRelative day calculation (36h → "2 days ago")
  • validator.ts: Widened email TLD regex to allow 2+ chars; added optional port support to URL regex

All 60 tests pass. No test files were modified. No new dependencies added.

- calculator: add division-by-zero guard
- string-utils: fix wordCount for multiple spaces, implement truncate
- task-manager: implement remove, update, and sortBy methods
- date-utils: use Math.round for day calculation in formatRelative
- validator: widen email TLD regex, allow ports in URL validation
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