How to preserve mocked fetch during window reload?
bahmutov opened this issue · comments
Gleb Bahmutov commented
it.skip('shows new item after reload', () => {
cy.get('.todo-list li').should('have.length', 2)
cy.get('.new-todo').type('new todo{enter}')
cy.get('.todo-list li')
.should('have.length', 3)
.contains('new todo')
// currently deletes the window.fetch mock
cy.reload()
})
this "loses" the stubbed fetch, and breaks in-memory json-server load
Gleb Bahmutov commented
done in #13