Skip to content

[GOOD FIRST ISSUE] Add unit tests for formatLocaleDate and formatLocaleTime fallback behavior #78

@utksh1

Description

@utksh1

Summary

frontend/src/utils/date.ts has several date formatting helpers. Add focused tests for invalid, empty, and Date object inputs for formatLocaleDate and formatLocaleTime.

Scope

  • Update or add tests near frontend/testing/unit/utils/date.test.ts.
  • Use fixed dates and, if needed, mocked timezone/localStorage.
  • Avoid dynamic current-date assertions.

Acceptance Criteria

  • Invalid/empty inputs return the expected fallback string.
  • Date object inputs format consistently.
  • Tests are deterministic across timezones.

Metadata

Metadata

Assignees

Labels

area:frontendFrontend React/UI workbeginner friendlySmall scoped task suitable for beginner contributorsgood first issueFriendly starter issue for first-time contributorslevel:beginner20 pts difficulty label for small beginner-friendly PRspriority:lowNice-to-have issue with low urgencytype:testingTesting work category bonus label

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions