Skip to content

fix: resolve all failing tests across utility library#158

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier1-2337-1779432562
Open

fix: resolve all failing tests across utility library#158
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier1-2337-1779432562

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented May 22, 2026

Summary

  • calculator.ts: Throw error on division by zero instead of returning Infinity
  • string-utils.ts: Fix wordCount to handle multiple consecutive spaces; implement truncate with word-boundary logic
  • task-manager.ts: Implement remove, update, and sortBy methods
  • date-utils.ts: Use Math.round for day calculation in formatRelative (fixes 36h → "2 days ago")
  • validator.ts: Allow long TLDs (e.g. .museum) in email validation; support ports and localhost in URL validation

Testing

All 60 tests pass (bun test). No test files were modified.

- calculator: throw on division by zero instead of returning Infinity
- string-utils: handle multiple spaces in wordCount, implement truncate
- task-manager: implement remove, update, and sortBy methods
- date-utils: use Math.round for day calculation in formatRelative
- validator: allow long TLDs and URLs with ports
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