Skip to content

fix: resolve failing tests and implement missing utility functions - #360

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2238-1790698903
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2238-1790698903

Conversation

@stooit

@stooit stooit commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Takes bun test from 44 passing / 16 failing to 60 passing / 0 failing. tsc --noEmit passes. No test files were changed and no dependencies were added.

  • calculator: divide now throws on division by zero instead of returning Infinity.
  • string-utils: wordCount now splits on any run of whitespace. truncate is now implemented: it cuts at a word boundary, appends ..., and never goes over maxLength.
  • task-manager: remove, update and sortBy are now implemented. sortBy sorts a copy, so the stored tasks keep their order.
  • date-utils: formatRelative now uses Math.round for days, the same as it does for minutes and hours.
  • validator: isEmail now accepts TLDs longer than 4 characters. isUrl now accepts URLs that include a port.

Assumptions / notes

  • divide can now throw, which is a breaking change for any caller that expected Infinity. Nothing in this repo relies on the old behaviour.
  • isEmail is still a loose format check, not full RFC 5322 validation.
  • The review found no critical issues.

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