setRequestHeader fail on XMLHttpRequestOverride #2222
Unanswered
eilon-shai
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am using msw in our tests and I cant understand how the functionality of
setRequestHeader can work on XMLHttpRequestOverride.
in my code I am creating a new XMLHttpRequest() and that become XMLHttpRequestOverride object in the tests instead of XMLHttpRequest.
then in the setRequestHeader code of XMLHttpRequest.js I am failing on the:
exports.is = value => { return utils.isObject(value) && utils.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation; };
There is a constraint to use the original implementation.
any idea how can I overcome this?
Thanks,
Eilon
Beta Was this translation helpful? Give feedback.
All reactions