What are hooks in Cypress?

What are hooks in Cypress?

Hi Devan ,

Cypress hooks are used to define or set preconditions that we want to execute before a set of tests or before each test. The available hooks are before(),beforeEach(),after(),afterEach().