Skip to content

fix: resolve failing tests and implement missing utilities - #355

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2175-1790525910
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2175-1790525910

Conversation

@stooit

@stooit stooit commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • calculator.divide throws on division by zero
  • string-utils: implement truncate (word-boundary, ellipsis within maxLength); fix wordCount for mixed whitespace
  • task-manager: implement remove, update (partial, returns false for unknown id), sortBy (priority/status/createdAt)
  • date-utils.formatRelative: round days instead of floor (36h → "2 days ago")
  • validator: isEmail allows long TLDs; isUrl allows explicit ports

Verification

bun test: 60 pass / 0 fail. bunx tsc --noEmit clean. No test files changed, no new dependencies.

Assumptions / notes

  • divide throwing is a behaviour change for callers expecting Infinity (required by tests).
  • Sort orders chosen: high>medium>low, in_progress>pending>completed, createdAt ascending.
  • isUrl accepts any http(s) host incl. localhost; don't use it as an SSRF guard.

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