mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(test-utils): prevent orphaned processes and use baseURL when loading (#18623)
This commit is contained in:
parent
a0085b70a3
commit
c9d0b2f6be
@ -30,12 +30,13 @@ export async function startServer () {
|
||||
for (let i = 0; i < 50; i++) {
|
||||
await new Promise(resolve => setTimeout(resolve, 100))
|
||||
try {
|
||||
const res = await $fetch('/')
|
||||
const res = await $fetch(ctx.nuxt!.options.app.baseURL)
|
||||
if (!res.includes('__NUXT_LOADING__')) {
|
||||
return
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
ctx.serverProcess.kill()
|
||||
throw new Error('Timeout waiting for dev server!')
|
||||
} else {
|
||||
ctx.serverProcess = execa('node', [
|
||||
|
Loading…
Reference in New Issue
Block a user