Aller au contenu principal

effacer

Réinitialise toutes les informations stockées dans le tableau mock.calls.

Utilisation
mock.clear()
Exemple
clear.js
it('should clear mock', async () => {
const mock = await browser.mock('https://google.com/')
await browser.url('https://google.com')

console.log(mock.calls.length) // returns 1
mock.clear()
console.log(mock.calls.length) // returns 0
})

Welcome! How can I help?

WebdriverIO AI Copilot