cypress-documentation icon indicating copy to clipboard operation
cypress-documentation copied to clipboard

Contradicting docs for `cy.clearLocalStorage()`

Open khitrenovich opened this issue 3 years ago • 0 comments

API docs state that cy.clearLocalStorage() yields null and cannot be chained. From https://docs.cypress.io/api/commands/clearlocalstorage#Arguments: image

Yet, samples site demonstrates that cy.clearLocalStorage() yields local storage object that can be queried, and we actually see this behavior with Cypress 10.7 (latest ATM). From https://example.cypress.io/commands/local-storage: image

Which one is correct? Can we expect cy.clearLocalStorage() to yield local storage object or it will break on us at some point?

khitrenovich avatar Sep 14 '22 14:09 khitrenovich