Skip to content

Commit

Permalink
fix(test): SVGElement reference error
Browse files Browse the repository at this point in the history
- 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`.
  vuejs/core#3590

issue #16
  • Loading branch information
kikuomax committed Jul 2, 2021
1 parent d91ed23 commit 5e37f88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/setup-global.js
Expand Up @@ -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

0 comments on commit 5e37f88

Please sign in to comment.