Repository navigation
test: cover string/numeric timestamp inputs for useRelativeTime (#597) - #1271
Merged
Chucks1093 merged 1 commit intoOct 27, 2026
Conversation
useRelativeTime (added in accesslayerorg#616) accepts string | number | Date timestamps, but every existing test only exercised Date objects (plus null/undefined/ invalid-string). accesslayerorg#616 merged into dev with Closes accesslayerorg#597 in its body, but GitHub never auto-closed the issue despite the merge. Adds coverage for an ISO date string and a numeric epoch-ms timestamp, the two accepted input shapes that had no test. Closes accesslayerorg#597
Member
✅ PR Ready for ReviewDue to a recent malware incident affecting our repositories, all PRs are required to pass automated security checks before being reviewed for merging. This PR has passed all automated checks:
Next step: Please share this PR link in our Telegram group so a maintainer can review and merge it: https://t.me/c/accesslayerorg/8514 |
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.
Summary
closes #597
#597 (useRelativeTime hook) was already implemented and merged via #616, correctly targeting dev with a Closes #597 line in its body, but GitHub never auto-closed the issue despite the merge.
The hook's type signature accepts string | number | Date timestamps, but every existing test only exercised Date objects (plus null/undefined/invalid-string), so this adds the missing coverage rather than a no-op verification PR.
Changes
Test plan