پاک کردن
تمام اطلاعات ذخیره شده در آرایه mock.calls
را بازنشانی میکند.
استفاده
mock.clear()
مثال
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
})