UNPKG

http-request-mock

Version:

Intercept & mock http requests issued by XMLHttpRequest, fetch, nodejs https/http module, axios, jquery, superagent, ky, node-fetch, request, got or any other request libraries by intercepting XMLHttpRequest, fetch and nodejs native requests in low level.

15 lines (14 loc) 499 B
export default class Dummy { /** * Initialize a dummy 'fetch' object if 'fetch' is not existent in the context. */ static initDummyFetchForUnitTest(): void; /** * Initialize a dummy 'wx.request' object if 'wx.request' is not existent in the context. */ static initDummyWxRequestForUnitTest(): void; /** * Initialize a dummy 'XMLHttpRequest' object if 'XMLHttpRequest' is not existent in the context. */ static initDummyXHRForUnitTest(): void; }