Files
bsky-social-app/__tests__
Jan Aagaard 69a9b2ecc5 Create a testable version of ago() and re-enable the disabled test (#4364)
* Enable the test of ago()

* Use test cases

This puts the input and the expected values next to each other.

* Create dateDiff function

This is a copy of ago(), but with the ability to specify the second date instead of using Date.now().

* Let ago() use dateDiff()

* Move constants close to usage

* Test dateDiff instead of ago

This makes it possible to test the dates without being forced to rely on what the current date is.

The commented out tests do not yet pass. This is fixed in later commits.

* Update dateDiff and enable the remaining tests
2024-06-17 17:35:37 -05:00
..