# mockRestoreAll

Restores all mock information and behavior stored in all registered mocks of the session. On a browsing context, it restores only the mocks made for that tab or window. Inside a parallel test, it restores only the mocks that the test created, also on tabs it opened.

## Usage[​](#usage "Direct link to Usage")

```
await browser.mockRestoreAll()
```

## Example[​](#example "Direct link to Example")

mockRestoreAll.js

```
it('should restore all mocks', async () => {

    const googleMock = await browser.mock('https://google.com/')

    googleMock.respond('https://webdriver.io')

    const wdioMock = await browser.mock('https://webdriver.io')

    wdioMock.respond('http://json.org')



    await browser.url('https://google.com/')

    console.log(await browser.getTitle()) // JSON



    await browser.mockRestoreAll()



    await browser.url('https://google.com/')

    console.log(await browser.getTitle()) // Google

})
```
