Browse Source

chore: avoid production tip during tests

dev
Evan You 7 years ago
parent
commit
6be9fdbc83
  1. 7
      src/platforms/web/runtime/index.js

7
src/platforms/web/runtime/index.js

@ -48,7 +48,11 @@ Vue.nextTick(() => {
if (config.devtools) {
if (devtools) {
devtools.emit('init', Vue)
} else if (process.env.NODE_ENV !== 'production' && isChrome) {
} else if (
process.env.NODE_ENV !== 'production' &&
process.env.NODE_ENV !== 'test' &&
isChrome
) {
console[console.info ? 'info' : 'log'](
'Download the Vue Devtools extension for a better development experience:\n' +
'https://github.com/vuejs/vue-devtools'
@ -56,6 +60,7 @@ Vue.nextTick(() => {
}
}
if (process.env.NODE_ENV !== 'production' &&
process.env.NODE_ENV !== 'test' &&
config.productionTip !== false &&
inBrowser && typeof console !== 'undefined'
) {

Loading…
Cancel
Save