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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

XMLSerializer is not a constructor/is undefined #7537

Closed
patoncrispy opened this issue Dec 19, 2018 · 6 comments
Closed

XMLSerializer is not a constructor/is undefined #7537

patoncrispy opened this issue Dec 19, 2018 · 6 comments

Comments

@patoncrispy
Copy link

馃悰 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
@thymikee
Copy link
Collaborator

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.

@patoncrispy
Copy link
Author

Thanks, @thymikee.

@patoncrispy
Copy link
Author

Is this documented somewhere?

@thymikee
Copy link
Collaborator

Yup, search for custom environment on our docs :)

@patoncrispy
Copy link
Author

If anyone else finds this issue, here is the documentation link: https://jestjs.io/docs/en/troubleshooting#compatibility-issues

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants