From 7838c0de31981318ad7f5d6e7ee0c7f1ccd6d460 Mon Sep 17 00:00:00 2001 From: Binwei Fang Date: Tue, 6 Apr 2021 14:43:23 +0800 Subject: [PATCH] fix(mocha): workaround the SVGElement issue in Vue (#6400) related to https://github.com/vuejs/vue-next/pull/2929 --- packages/@vue/cli-plugin-unit-mocha/setup.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@vue/cli-plugin-unit-mocha/setup.js b/packages/@vue/cli-plugin-unit-mocha/setup.js index d615cf2d40..df81b0b514 100644 --- a/packages/@vue/cli-plugin-unit-mocha/setup.js +++ b/packages/@vue/cli-plugin-unit-mocha/setup.js @@ -4,3 +4,5 @@ require('jsdom-global')(undefined, { pretendToBeVisual: true, url: 'http://local window.Date = Date // https://github.com/vuejs/vue-next/pull/2943 global.ShadowRoot = window.ShadowRoot + +global.SVGElement = window.SVGElement