https://cypress.io logo
integrate the database requests with ORM or direct...
# best-practices
p
integrate the database requests with ORM or direct integration with the database with cy.task, then create custom command that clears the database like cy.clearSeededData() and use it in declared "afterAll(()=>{})" before all the its. This is how i've done it and it works flawlessly. I know that in cypress documentation they do not recommend usign afterAll() or after(), but i've never had the issues they pointed out for the past one and half year of daily tests running