Many applications have features that can be used with slight variations. Instead of maintaining multiple tests with nearly identical code, we can take advantage of the JavaScript runtime and use normal data structures and plain old JavaScript to test and make assertions for multiple interactions in a single test.
why can't we just loop through the values of the filters array ? what's the purpose of the cy.wrap function
filters.forEach(filter => {
cy.contains(filter.link).click()
cy.get('.todo-list li').should('have.length', filter.expectedLength)
})
There is the misprint in the transcription in block 03:47. In the code at line 11. You have .each(filters => { instead of .each(filter => {