Skip to content

Commit

Permalink
fix: do not mutate options to get api config (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
Demivan committed Feb 1, 2022
1 parent c68fce4 commit 9504905
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vitest/src/node/plugins/index.ts
Expand Up @@ -22,8 +22,9 @@ export async function VitestPlugin(options: UserConfig = {}, ctx = new Vitest())
// preliminary merge of options to be able to create server options for vite
// however to allow vitest plugins to modify vitest config values
// this is repeated in configResolved where the config is final
const preOptions = deepMerge(options, viteConfig.test || {})
const preOptions = deepMerge({}, options, viteConfig.test ?? {})
preOptions.api = resolveApiConfig(preOptions)

return {
clearScreen: false,
resolve: {
Expand Down

0 comments on commit 9504905

Please sign in to comment.