Skip to content

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

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2173-1790225189
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2173-1790225189

Conversation

@stooit

@stooit stooit commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • calculator.divide throws on division by zero
  • date-utils.formatRelative uses rounding for day buckets (36h → 2 days ago)
  • string-utils: wordCount splits on /\s+/; truncate implemented (word-boundary, ellipsis counts toward maxLength)
  • validator: isEmail accepts subdomains and long TLDs; isUrl accepts explicit ports
  • TaskManager: remove, update, sortBy implemented

Verification

  • bun test: 60 pass / 0 fail (was 44 / 16)
  • bunx tsc --noEmit: clean
  • No test files modified, no dependencies added

Assumptions

  • sortBy('status') ordering (in_progress > pending > completed) isn't covered by tests; chosen as a reasonable default.
  • truncate with maxLength <= 3 hard-cuts without an ellipsis.

Follow-ups (not in scope)

  • Pre-existing: formatRelative can show "24 hours ago` for 23.5–23.99h.

- calculator: divide throws on zero divisor
- date-utils: round day diff in formatRelative
- string-utils: fix wordCount whitespace handling, implement truncate
- validator: accept long TLDs/subdomains in isEmail, ports in isUrl
- task-manager: implement remove, update, sortBy
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