Implement early mock of the Vue.js 3 to configure compat
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
-
❌ Onmaster
should fail complaining aboutGLOBAL_EXTEND
being deprecated -
⚠ on this branch should fail due to settingchildren
prop on stub (addressed in Add proper handling for props in Vue.js 3 stubs (!125733 - merged))
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Illya Klymov