Cypress Tip: In-Spec Functions
Let's imagine you have a bunch of repeatable code in your Cypress tests:
it('should do this thing', () => {
// ...
cy.get('#thisElement')
.then($el => {
// some unusual hackery here
})
// ...
})
it('should do that thing', () => {
...
iheartjs.hashnode.dev3 min read