From 5e37f88ff6ccfbff5df02a874e9e06789f9b214e Mon Sep 17 00:00:00 2001 From: Kikuo Emoto Date: Sat, 3 Jul 2021 02:14:26 +0900 Subject: [PATCH] fix(test): SVGElement reference error - After upgrading `vue` and `@vue/test-utils`, I got errors "ReferenceError: SVGElement is not defined" when I ran unit tests. This is fixed by introducing `window.SVGElement` into `global`. https://github.com/vuejs/vue-next/issues/3590 issue #16 --- test/setup-global.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/setup-global.js b/test/setup-global.js index 4fd787e..adb22e7 100644 --- a/test/setup-global.js +++ b/test/setup-global.js @@ -14,3 +14,7 @@ window.crypto = { } } } + +// get "ReferenceError: SVGElement is not defined" otherwise +// https://github.com/vuejs/vue-next/issues/3590 +global.SVGElement = window.SVGElement