fix: waitFor productionTip to be printed (1.x tests) (#4129)

This commit is contained in:
Pim 2018-10-16 12:28:49 +02:00 committed by Pooya Parsa
parent 376dd35ba9
commit 68a14e64e4
2 changed files with 4 additions and 3 deletions

View File

@ -105,7 +105,7 @@
"source-map": "^0.7.0",
"style-resources-loader": "^1.0.0",
"uglifyjs-webpack-plugin": "^1.1.8",
"upath": "^1.0.2",
"upath": "^1.1.0",
"url-loader": "^0.6.2",
"vue": "^2.5.17",
"vue-loader": "^13.7.2",
@ -143,7 +143,7 @@
"jsdom": "^11.6.2",
"json-loader": "^0.5.7",
"nyc": "^11.4.1",
"puppeteer": "^1.0.0",
"puppeteer": "^1.9.0",
"request": "^2.83.0",
"request-promise-native": "^1.0.5",
"sinon": "^4.3.0",

View File

@ -1,7 +1,7 @@
import test from 'ava'
import { resolve } from 'path'
import { intercept, release } from './helpers/console'
import { Nuxt, Builder } from '..'
import { Nuxt, Builder, Utils } from '..'
const port = 4001
const url = route => 'http://localhost:' + port + route
@ -46,6 +46,7 @@ test.serial('Init Nuxt.js', async t => {
test.serial('/stateless', async t => {
const spies = await intercept()
const window = await nuxt.renderAndGetWindow(url('/stateless'))
await Utils.waitFor(5)
const html = window.document.body.innerHTML
t.true(html.includes('<h1>My component!</h1>'))
t.true(spies.info.calledWithMatch('You are running Vue in development mode.'))