Home

Issue: 2837

Importing nuxt inside jest logs Vue.productionTip to console

[issue link]

Hi folks, I’ve just added nuxt to my koa app, and I noticed an impact on my api test suite. It seems that solely by importing nuxt, Vue’s production tip is logged to the console.

Below is an isolated reproduction of the issue, and you can download it here.

const { Nuxt } = require('nuxt')

it('logs vue production tip', () => {
  console.log('done')
})

(note that it doesn’t actually render anything)

npm test

 PASS  ./test.js
  ✓ logs vue production tip (1ms)

  console.info node_modules/vue/dist/vue.runtime.common.js:7913
    You are running Vue in development mode.
    Make sure to turn on production mode when deploying for production.
    See more tips at https://vuejs.org/guide/deployment.html

  console.log test.js:4
    done

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        2.429s
Ran all test suites.

Any idea what’s going on here?

This question is available on Nuxt.js community (#c2462)