Test: Add fallback unit tests for formatLocaleDate and formatLocaleTime #78#173
Open
SaumyaT-21 wants to merge 2 commits into
Open
Test: Add fallback unit tests for formatLocaleDate and formatLocaleTime #78#173SaumyaT-21 wants to merge 2 commits into
SaumyaT-21 wants to merge 2 commits into
Conversation
utksh1
requested changes
May 22, 2026
Owner
utksh1
left a comment
There was a problem hiding this comment.
Thanks! A couple quick nits before merge:\n\n- Fix typos: -> in test names.\n- Minor formatting: remove extra space in and align arrow spacing for consistency.\n\nAlso, since this is frontend-only, if backend-tests are failing due to unrelated CI flakiness, please rerun CI once the above is fixed.
utksh1
requested changes
May 22, 2026
Owner
utksh1
left a comment
There was a problem hiding this comment.
Thanks! A couple quick nits before merge:
- Fix typos in test names: “undefinied” -> “undefined”.
- Minor formatting: remove extra space in expect(...) and keep arrow spacing consistent.
Also, since this is frontend-only, if backend-tests are failing due to unrelated CI flakiness, please rerun CI once the above is fixed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Added fallback unit tests for formatLocaleDate and formatLocaleTime (issue #78) to safely handle "undefined" and "null" user inputs. Ensures that the system won't crash and will cleanly fall back to returning "N/A" if empty values leak through.
Related Issues
Closes issue #78
Type of Change
How Has This Been Tested?
Ran the local Vitest testing framework inside the frontend folder.
Verified that the test suite inside
testing/unit/utils/date.test.tssuccessfully expanded from 15 passing tests to 19 passing tests, proving the new fallback paths work under simulation.Checklist