Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

20
What to unit test in frontend?
Post Body

Most of the articles I find online is explaining 'how' to unit test but I want to know 'what' to unit test. How do you decide this?

It doesn't make sense to me. I feel like unit testing is made for the backend. It's hard to wrap my head around why and 'what' I would test in the frontend except some frontend JS logic (including things like Redux actions, whether an API call is making the right changes in the UI, etc.). However, I can't see what I would unit test in the 'visual' realm of the things, such as how a layout 'looks' on different devices, the CSS and HTML etc.

Author
Account Strength
100%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
10,085
Link Karma
7,454
Comment Karma
2,487
Profile updated: 6 days ago
Posts updated: 11 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago