Toptal Interview Question

How would I unit test this component?

Toptal Interview Question: How would I unit test this component? | Glassdoor