Commit a71d02bb authored by Winnie Hellmann's avatar Winnie Hellmann

Add workaround for Vue test utils setProps

see https://github.com/vuejs/vue-test-utils/issues/631#issuecomment-421108344
parent 965dbbd2
......@@ -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}`);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment