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

fix: add XMLSerializer to the global scope #7101

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: add XMLSerializer to the global scope
In @vue/test-utils 2.0.0rc18, The usage of XMLSerializer was introduced: https://github.com/vuejs/test-utils/blob/d86cbc333de7b2ec1208f5d3c65e0879671dd01e/src/utils/stringifyNode.ts#L4

XMLSerializer needs to be available as a global so cli-plugin-unit-mocha will stay compatible with newer versions of @vue/test-utils.
  • Loading branch information
maerteijn committed Apr 10, 2022
commit 535fff69b8e77b4010559df2af6164d05f6a251a
3 changes: 3 additions & 0 deletions packages/@vue/cli-plugin-unit-mocha/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ window.Date = Date
global.ShadowRoot = window.ShadowRoot

global.SVGElement = window.SVGElement

// https://github.com/vuejs/test-utils/issues/1253
global.XMLSerializer = window.XMLSerializer