wegue-oss / wegue

Template and components for webmapping applications with OpenLayers and Vue.js
BSD 2-Clause "Simplified" License
93 stars 41 forks source link

Do not assign to Vue.prototype in unit tests #388

Open chrismayer opened 2 months ago

chrismayer commented 2 months ago

The assignment of $appConfig (and maybe other properties) on Vue.prototype directly inside unit tests is considered bad practice. We should create a local Vue instance and assign to this local instance in place of the global one.

At least affects LocaleSwitcher.spec.js and Locale.spec.js.

Found in #387 by @sronveaux