We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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:
The text was updated successfully, but these errors were encountered: