Skip to content

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

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2226-1790785333
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2226-1790785333

Conversation

@stooit

@stooit stooit commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • calculator: divide throws on zero divisor.
  • string-utils: wordCount splits on any whitespace run; implemented truncate (word-boundary, ellipsis counts toward maxLength).
  • task-manager: implemented remove, update (partial, !== undefined guards), sortBy (returns a copy; priority high→low, createdAt oldest first).
  • validator: isEmail allows subdomains and TLDs of 2+ chars (reviewed: no ReDoS); isUrl accepts URLs with ports (http/https only).
  • date-utils: formatRelative rounds day buckets (36h → "2 days ago"), symmetric for future dates.

Verification

  • bun test: 60 pass / 0 fail (was 44/16)
  • bunx tsc --noEmit: clean
  • Test files unchanged; no new dependencies.

Assumptions

  • sortBy('status') has no test coverage; chose order in_progress → pending → completed.
  • divide throwing is a behaviour change for callers relying on Infinity; required by tests.

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