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

Fake XHR XML document parser fails to parse. #54

Closed
bafolts opened this issue Jun 1, 2018 · 0 comments · Fixed by #55
Closed

Fake XHR XML document parser fails to parse. #54

bafolts opened this issue Jun 1, 2018 · 0 comments · Fixed by #55

Comments

@bafolts
Copy link

bafolts commented Jun 1, 2018

It looks like there is an error attempting to determine what a parse error may look like.

https://github.com/sinonjs/nise/blob/master/lib/fake-xhr/index.js#L345

I have a situation running with a DOMParser stub in node where the document INVALID does not return any elements with a parseerror tag name. In this situation my XML is failing to parse even though my XML is valid. The check for getElementsByTagName("parsererror") should verify that it got a result prior to checking the item at index 0. In my situation I have valid XML but no parsererror for the "INVALID" document.

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 a pull request may close this issue.

1 participant