Skip to content

fix: make all tests pass and implement missing utilities - #475

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-912-1794617530
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-912-1794617530

Conversation

@stooit

@stooit stooit commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • calculator.divide: throws Division by zero when divisor is 0
  • string-utils: implement truncate (word-boundary, ... counts toward maxLength, never exceeds maxLength); wordCount splits on any whitespace run
  • TaskManager: implement remove, update (explicit allowed-field assignment), sortBy (priority/createdAt/status)
  • date-utils.formatRelative: round days instead of floor (symmetric for past/future)
  • validator: isEmail accepts long TLDs; isUrl accepts ports
  • Removed stale BUG/TODO comments

bun test: 60 pass, 0 fail (was 44/16). No test files modified, no deps added.

Assumptions

  • divide(x, 0) throwing is the intended contract (per tests); this changes prior Infinity/NaN behaviour.
  • update may clear description when explicitly passed undefined; title/priority are skipped when undefined.
  • sortBy("status") order: pending → in_progress → completed (untested).
  • truncate with maxLength < 3 hard-slices without ellipsis.

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