20 lines
958 B
TypeScript
20 lines
958 B
TypeScript
|
|
export {};
|
||
|
|
/**
|
||
|
|
* Abort the request with one of the following error codes:
|
||
|
|
* `Failed`, `Aborted`, `TimedOut`, `AccessDenied`, `ConnectionClosed`,
|
||
|
|
* `ConnectionReset`, `ConnectionRefused`, `ConnectionAborted`,
|
||
|
|
* `ConnectionFailed`, `NameNotResolved`, `InternetDisconnected`,
|
||
|
|
* `AddressUnreachable`, `BlockedByClient`, `BlockedByResponse`.
|
||
|
|
*
|
||
|
|
* <example>
|
||
|
|
:abort.js
|
||
|
|
it('should block Google Analytics from page', async () => {
|
||
|
|
const mock = await browser.mock('https://www.google-analytics.com/**')
|
||
|
|
mock.abort('Failed')
|
||
|
|
})
|
||
|
|
* </example>
|
||
|
|
*
|
||
|
|
* @alias mock.abort
|
||
|
|
* @param {ErrorCode} errorCode error code of the response, can be one of: `Failed`, `Aborted`, `TimedOut`, `AccessDenied`, `ConnectionClosed`, `ConnectionReset`, `ConnectionRefused`, `ConnectionAborted`, `ConnectionFailed`, `NameNotResolved`, `InternetDisconnected`, `AddressUnreachable`, `BlockedByClient`, `BlockedByResponse`
|
||
|
|
*/
|
||
|
|
//# sourceMappingURL=abort.d.ts.map
|