test-utils: Bug: ReferenceError: XMLSerializer problems
Describe the bug
Since release 2.0.0-rc.18 I sometimes encounter the following error when running my testsuite with JSDOM:
TypeError: Failed to execute 'serializeToString' on 'XMLSerializer': parameter 1 is not of type 'Node'.
This does not happen with 2.0.0-rc.17. There are more issues with XMLSerializer, but this one is reproducable in a separate testcase. I can add more tests for the other issues when requested.
To Reproduce See the repo here: https://github.com/maerteijn/xmlserializer-problems-testcase See the CI result here: https://github.com/maerteijn/xmlserializer-problems-testcase/actions/runs/1720099564
Expected behavior
That the test won’t fail due to the use of XMLSerializer. I have the feeling that it has a large impact on how vue-test-utils responds compared to previous versions.
Related information:
@vue/test-utilsversion: 2.0.0-rc.18Vueversion: 3.2.xJSDOMversion: 16.7 until v19.0nodeversion: v16.13.0npm(oryarn) version: 8.1.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (6 by maintainers)
A PR with a
XMLSerializerglobal was merged, thank you all for helping out!@cexbrayat Yes I think so. It’s not an issue with
test-utilsand your jest based test environment is working as it should.