Challenge: Cypress Component Testing

Learn and practice component testing with Cypress by mocking dates.

Let’s practice component testing by testing a relative time difference calculator.

Time calculator component

This component renders a paragraph showing the difference between two dates in either days, weeks, months, or years. We can see the component in action on the individual meetup pages found in /pages/[slug].tsx file.

Get hands-on with 1200+ tech skills courses.