mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-28 00:22:05 +00:00
fix: waitFor productionTip to be printed (1.x tests) (#4129)
This commit is contained in:
parent
376dd35ba9
commit
68a14e64e4
@ -105,7 +105,7 @@
|
|||||||
"source-map": "^0.7.0",
|
"source-map": "^0.7.0",
|
||||||
"style-resources-loader": "^1.0.0",
|
"style-resources-loader": "^1.0.0",
|
||||||
"uglifyjs-webpack-plugin": "^1.1.8",
|
"uglifyjs-webpack-plugin": "^1.1.8",
|
||||||
"upath": "^1.0.2",
|
"upath": "^1.1.0",
|
||||||
"url-loader": "^0.6.2",
|
"url-loader": "^0.6.2",
|
||||||
"vue": "^2.5.17",
|
"vue": "^2.5.17",
|
||||||
"vue-loader": "^13.7.2",
|
"vue-loader": "^13.7.2",
|
||||||
@ -143,7 +143,7 @@
|
|||||||
"jsdom": "^11.6.2",
|
"jsdom": "^11.6.2",
|
||||||
"json-loader": "^0.5.7",
|
"json-loader": "^0.5.7",
|
||||||
"nyc": "^11.4.1",
|
"nyc": "^11.4.1",
|
||||||
"puppeteer": "^1.0.0",
|
"puppeteer": "^1.9.0",
|
||||||
"request": "^2.83.0",
|
"request": "^2.83.0",
|
||||||
"request-promise-native": "^1.0.5",
|
"request-promise-native": "^1.0.5",
|
||||||
"sinon": "^4.3.0",
|
"sinon": "^4.3.0",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import { intercept, release } from './helpers/console'
|
import { intercept, release } from './helpers/console'
|
||||||
import { Nuxt, Builder } from '..'
|
import { Nuxt, Builder, Utils } from '..'
|
||||||
|
|
||||||
const port = 4001
|
const port = 4001
|
||||||
const url = route => 'http://localhost:' + port + route
|
const url = route => 'http://localhost:' + port + route
|
||||||
@ -46,6 +46,7 @@ test.serial('Init Nuxt.js', async t => {
|
|||||||
test.serial('/stateless', async t => {
|
test.serial('/stateless', async t => {
|
||||||
const spies = await intercept()
|
const spies = await intercept()
|
||||||
const window = await nuxt.renderAndGetWindow(url('/stateless'))
|
const window = await nuxt.renderAndGetWindow(url('/stateless'))
|
||||||
|
await Utils.waitFor(5)
|
||||||
const html = window.document.body.innerHTML
|
const html = window.document.body.innerHTML
|
||||||
t.true(html.includes('<h1>My component!</h1>'))
|
t.true(html.includes('<h1>My component!</h1>'))
|
||||||
t.true(spies.info.calledWithMatch('You are running Vue in development mode.'))
|
t.true(spies.info.calledWithMatch('You are running Vue in development mode.'))
|
||||||
|
Loading…
Reference in New Issue
Block a user