Open radarfox opened 5 years ago
Hello,
awesome project, helped a lot. Thanks! Only problem I found is that mocking URLs starting with file:// isn't working properly.
file://
This doesn't work:
xhrMock.setup(); const url = 'file:///C:/web/index.html'; xhrMock.get(url , {body: '<html></html>'}); const xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.send();
It outputs this error:
ERROR: 'xhr-mock: No handler returned a response for the request. GET file:/C:/web/index.html HTTP/1.1
So my current hotfix is this:
xhrMock.setup(); xhrMock.get('file:/C:/web/index.html', {body: '<html></html>'}); const xhr = new XMLHttpRequest(); xhr.open('GET', 'file:///C:/web/index.html', true); xhr.send();
Hello,
awesome project, helped a lot. Thanks! Only problem I found is that mocking URLs starting with
file://
isn't working properly.This doesn't work:
It outputs this error:
So my current hotfix is this: