Closed seanmturley closed 8 months ago
Spent a bit of time working on formatNumber
improvements, including correct plural vs singular for "comments"/"upvotes ", but I think these words will be replaced with icons anyway, so it's unnecessary.
I'm removing these from the task list above (though correct pluralisation still applies to the units of time for post age).
Added tests for post age - possibly a bit over-exhaustive, though I only checked rounding and removal of plural "s" for one unit of time.
Added simple test to check the post's image loads in Card
.
That's the Card
tests done. Closing.
Description
Add tests for the Card component.
A guide to testing React Router related functions is available in the official Testing Library documentation.
Tests:
On subreddit pages
Card
should display:On the homepage and search pages
Card
should display: