()
| 5 | |
| 6 | class MockXMLHttpRequest { |
| 7 | constructor() { |
| 8 | this.requestHeaders = {}; |
| 9 | this.responseHeaders = ''; |
| 10 | this.readyState = 0; |
| 11 | this.status = 0; |
| 12 | this.statusText = ''; |
| 13 | this.responseText = ''; |
| 14 | this.response = null; |
| 15 | this.timeout = 0; |
| 16 | this.onreadystatechange = null; |
| 17 | this.onloadend = null; |
| 18 | this.onabort = null; |
| 19 | this.onerror = null; |
| 20 | this.ontimeout = null; |
| 21 | this.upload = { |
| 22 | addEventListener() {}, |
| 23 | }; |
| 24 | } |
| 25 | |
| 26 | open(method, url, async = true) { |
| 27 | this.method = method; |
nothing calls this directly
no outgoing calls
no test coverage detected