XMLSerializer is not a constructor/is undefined
See original GitHub issue🐛 Bug Report
While trying to test a class that uses XMLSerializer
, I get the error ‘XMLSerializer is not a constructor’ or ‘XMLSerializer is undefined’. I have testEnvironment
set to jsdom
just in case.
To Reproduce
Add new XMLSerializer();
to a test.
Expected behavior
XMLSerializer
should work as expected. Support for it was added to jsdom in v13.
Link to repl or repo (highly encouraged)
https://repl.it/@ChrisPaton/DarkredShinyOutliers
Environment:
OS: macOS 10.14.2
Node: 8.12.0
Yarn: 1.12.3
npm: 6.4.1
Watchman: Not Found
Xcode: Not Found
Android Studio: Not Found
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
XMLSerializer is undefined in jest test - Stack Overflow
I've currently used a wrapped for XMLSerializer as below (typescript code): export default class XmlSerializerWrapper { private serializer: ...
Read more >XMLSerializer - Web APIs | MDN
The XMLSerializer interface provides the serializeToString() method to construct an XML string representing a DOM tree.
Read more >XmlSerializer Class (System.Xml.Serialization) | Microsoft Learn
Serializes and deserializes objects into and from XML documents. The XmlSerializer enables you to control how objects are encoded into XML.
Read more >4.3 Dependencies - Spring
If there is no potential for ambiguity in the constructor arguments of a bean ... Find below a small part of a Spring...
Read more >fast-xml-parser - npm
Validate XML, Parse XML to JS Object, or Build XML from JS Object without C/C++ based libraries and no callback. Looking for maintainers....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You’ll need to use custom jsdom environment, like this one, to use that, as jsdom dropped Node 6 in v12 and we can’t go with that currently.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.