Apply suggestion to spec/javascripts/test_bundle.js

This commit is contained in:
Winnie Hellmann 2019-01-25 10:47:41 +00:00
parent 8e6d2cca24
commit 52963c8940

View file

@ -23,7 +23,7 @@ let hasVueWarnings = false;
Vue.config.warnHandler = (msg, vm, trace) => { Vue.config.warnHandler = (msg, vm, trace) => {
// The following workaround is necessary, so we are able to use setProps from Vue test utils // 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 // see https://github.com/vuejs/vue-test-utils/issues/631#issuecomment-421108344
const currentStack = new Error('').stack; const currentStack = new Error().stack;
const isInVueTestUtils = currentStack const isInVueTestUtils = currentStack
.split('\n') .split('\n')
.some(line => line.startsWith(' at VueWrapper.setProps (')); .some(line => line.startsWith(' at VueWrapper.setProps ('));