mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
Set virtualConsole to true by default
This commit is contained in:
parent
f33afa521f
commit
8d17d20dba
@ -109,9 +109,9 @@ export function renderAndGetWindow (url, opts = {}) {
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
let virtualConsole
|
||||
if (opts.virtualConsole === true) {
|
||||
virtualConsole = jsdom.createVirtualConsole().sendTo(console)
|
||||
let virtualConsole = jsdom.createVirtualConsole().sendTo(console)
|
||||
if (opts.virtualConsole === false) {
|
||||
virtualConsole = undefined
|
||||
}
|
||||
url = url || 'http://localhost:3000'
|
||||
return new Promise((resolve, reject) => {
|
||||
|
@ -43,7 +43,7 @@ test('/stateful', async t => {
|
||||
})
|
||||
|
||||
test('/head', async t => {
|
||||
const window = await nuxt.renderAndGetWindow(url('/head'), { virtualConsole: true })
|
||||
const window = await nuxt.renderAndGetWindow(url('/head'), { virtualConsole: false })
|
||||
const html = window.document.body.innerHTML
|
||||
const metas = window.document.getElementsByTagName('meta')
|
||||
t.is(window.document.title, 'My title')
|
||||
|
Loading…
Reference in New Issue
Block a user