Skip to content

Implement early mock of the Vue.js 3 to configure compat

Illya Klymov requested to merge xanf-magic-vue-mock into master

Related issue: #390830 (closed)

What does this MR do and why?

In order to avoid extra console.warn about deprecations we run configureCompat during test setup setting suppress-warning thing. However imports are evaluated earlier than than, so when certain imports (like ~/alert) invoke Vue during initialization, we have extra warning about GLOBAL_EXTEND being deprecated

In order to workaround this we mock vue doing very simple thing - running configureCompat on any import

Screenshots or screen recordings

N/A

How to set up and validate locally

VUE_VERSION=3 yarn jest spec/frontend/work_items/components/work_item_links/work_item_link_child_spec.js

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Illya Klymov

Merge request reports