Skip to content

Commit

Permalink
fix: avoid calling buildStart twice (fix #679) (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Feb 5, 2022
1 parent 4d1601c commit bae876d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vitest/src/node/create.ts
Expand Up @@ -23,10 +23,11 @@ export async function createVitest(options: UserConfig, viteOverrides: ViteUserC
}

const server = await createServer(mergeConfig(config, viteOverrides))
await server.pluginContainer.buildStart({})

if (ctx.config.api?.port)
await server.listen()
else
await server.pluginContainer.buildStart({})

return ctx
}

0 comments on commit bae876d

Please sign in to comment.