1 | import { Mock, MockFunction, ErrorCallbackEvent } from './types';
|
2 | export declare class XHRMock {
|
3 | RealXMLHttpRequest: {
|
4 | new (): XMLHttpRequest;
|
5 | };
|
6 | setup(): XHRMock;
|
7 | teardown(): XHRMock;
|
8 | reset(): XHRMock;
|
9 | error(callback: (event: ErrorCallbackEvent) => void): XHRMock;
|
10 | mock(fn: MockFunction): XHRMock;
|
11 | mock(method: string, url: string | RegExp, mock: Mock): XHRMock;
|
12 | use(fn: MockFunction): XHRMock;
|
13 | use(method: string, url: string | RegExp, mock: Mock): XHRMock;
|
14 | get(url: string | RegExp, mock: Mock): XHRMock;
|
15 | post(url: string | RegExp, mock: Mock): XHRMock;
|
16 | put(url: string | RegExp, mock: Mock): XHRMock;
|
17 | patch(url: string | RegExp, mock: Mock): XHRMock;
|
18 | delete(url: string | RegExp, mock: Mock): XHRMock;
|
19 | }
|
20 | declare const _default: XHRMock;
|
21 | export default _default;
|