Skip to content

Commit

Permalink
fix: add XMLSerializer to the global scope
Browse files Browse the repository at this point in the history
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
1 parent 940e436 commit 535fff6
Showing 1 changed file with 3 additions and 0 deletions.
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

0 comments on commit 535fff6

Please sign in to comment.