Skip to content
New issue

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

closes #79 implement overrideMimeType as a noop #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

csimi
Copy link

@csimi csimi commented Aug 24, 2020

Based on https://xhr.spec.whatwg.org/#the-overridemimetype()-method exception should be thrown in LOADING and DONE state, otherwise do nothing.

Copy link
Owner

@jameslnewell jameslnewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Thanks @csimi!

throw notImplementedError;
if (this.readyState >= MockXMLHttpRequest.LOADING) {
throw new MockError('xhr must not be LOADING or DONE.');
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we please explicitly check DONE just to make it a little clearer to understand what's going on at first sight 🙏

Should the passed mime affect the .responseType and related methods?

@ashwinGokhale
Copy link

@csimi @jameslnewell any traction on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants