Vue test utils require extra parameters in Karma tests
The following discussion from gitlab-ee!8593 should be addressed:
-
@pslaughter started a discussion: (+3 comments) vent: This was causing me to lose my mind... Before adding
localVue
andsync: false
, I was experiencing some very weird behavior with thesevue-test-utils
tests.The tests worked when ran individually, but running
yarn run karma
revealed the following:- Unrelated tests were failing their assertions.
- This test triggered a
Max call stack size exceeded
. It looked like there was a forever loop when trying toshallowMount
🤷 .
localVue
?It looks like there's some issues when
vue-test-utils
touches a component and the component is used in a separate test that doesn't usevue-test-utils
. For example, when I tried runningmr_widget_pipeline_container_spec.js
without settinglocalVue
it would "stub" the childpipeline
component, causing it to never be rendered properly in any other test😱 .sync: false
?I honestly have no idea why this component was triggering a forever loop, but it's probably related to specs stepping onto eachother's toes somehow... I'm thinking that the
Icon
component might be the real culprit...(Pinging @iamphill & @psimyn since you might be interested in this)