From 6be9fdbc8374225b98620cae6d87d97d861913cc Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 30 Dec 2017 20:01:57 -0500 Subject: [PATCH] chore: avoid production tip during tests --- src/platforms/web/runtime/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/platforms/web/runtime/index.js b/src/platforms/web/runtime/index.js index 3751acec..71fe444a 100644 --- a/src/platforms/web/runtime/index.js +++ b/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' ) {