cypress-documentation
cypress-documentation copied to clipboard
Contradicting docs for `cy.clearLocalStorage()`
API docs state that cy.clearLocalStorage() yields null and cannot be chained.
From https://docs.cypress.io/api/commands/clearlocalstorage#Arguments:

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:

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