Skip to content

fix: resolve all failing tests across 5 utility modules#170

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier1-2397-1779437773
Open

fix: resolve all failing tests across 5 utility modules#170
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier1-2397-1779437773

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 split on /\s+/; implement truncate with word-boundary logic
  • task-manager.ts: Implement remove, update, and sortBy methods
  • date-utils.ts: Use Math.round instead of Math.floor for relative day calculation
  • validator.ts: Accept TLDs of 2+ characters in isEmail; allow ports in isUrl

Test Results

All 60 tests pass (previously 44 pass / 16 fail).

Assumptions

  • No test files were modified
  • No new dependencies were added
  • All fixes are minimal and targeted to make failing tests pass without breaking existing ones

- calculator.ts: throw Error on division by zero instead of returning Infinity
- string-utils.ts: fix wordCount to split on /\s+/ for multiple spaces
- string-utils.ts: implement truncate function with word-boundary logic
- task-manager.ts: implement remove, update, and sortBy methods
- date-utils.ts: use Math.round instead of Math.floor for relative days
- validator.ts: accept TLDs of 2+ chars in isEmail
- validator.ts: allow ports in isUrl 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