Skip to content

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

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2211-1791048291
Open

stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier1-2211-1791048291

Conversation

@stooit

@stooit stooit commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all 16 failing tests (now 60/60 pass, tsc --noEmit clean). No test files or dependencies changed.

  • calculator: divide throws Error("Division by zero") when divisor is 0.
  • string-utils: wordCount splits on /\s+/ after trim; implemented truncate (word-boundary cut, ellipsis counted toward maxLength).
  • validator: isEmail accepts subdomains/long TLDs (254-char guard); isUrl no longer rejects URLs with ports (http/https allowlist retained).
  • date-utils: formatRelative rounds days to nearest (36h → "2 days ago").
  • task-manager: implemented remove, update (partial, only provided fields), sortBy (priority high→low, status, createdAt ascending).

Assumptions

  • Behaviour defined by existing tests; where silent, chose conservative behaviour (e.g. update ignores undefined fields).
  • Non-blocking: negative maxLength in truncate is not guarded (not 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