diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js index 547379dabed..1ea37c791ee 100644 --- a/spec/javascripts/test_bundle.js +++ b/spec/javascripts/test_bundle.js @@ -21,6 +21,16 @@ Vue.config.productionTip = false; let hasVueWarnings = false; Vue.config.warnHandler = (msg, vm, trace) => { + // The following workaround is necessary, so we are able to use setProps from Vue test utils + // see https://github.com/vuejs/vue-test-utils/issues/631#issuecomment-421108344 + const currentStack = new Error('').stack; + const isInVueTestUtils = currentStack + .split('\n') + .some(line => line.startsWith(' at VueWrapper.setProps (')); + if (isInVueTestUtils) { + return; + } + hasVueWarnings = true; fail(`${msg}${trace}`); };