Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix options clonning #656

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions packages/vitest/src/node/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,15 @@ export async function VitestPlugin(options: UserConfig = {}, ctx = new Vitest())
cacheDir: undefined,
}
},
async configResolved(viteConfig) {
// viteConfig.test is final now, merge it for real
options = deepMerge(options, viteConfig.test as any || {})
options.api = resolveApiConfig(options)
async configResolved() {
ctx.config.api = resolveApiConfig(options)
},
async configureServer(server) {
if (haveStarted)
await ctx.report('onServerRestart')
await ctx.setServer(options, server)
haveStarted = true
if (options.api)
if (ctx.config.api)
(await import('../../api/setup')).setup(ctx)

// #415, in run mode we don't need the watcher, close it would improve the performance
Expand Down