Skip to content

Commit

Permalink
refactor: don't provide extends/workspaceConfigPath in the config (#6904
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sheremet-va authored Nov 14, 2024
1 parent 80f8bbf commit 6324a00
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/vitest/src/node/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export async function initializeProject(
) {
const project = new WorkspaceProject(workspacePath, ctx, options)

const { extends: extendsConfig, workspaceConfigPath, ...restOptions } = options
const root
= options.root
|| (typeof workspacePath === 'number'
Expand All @@ -62,14 +63,14 @@ export async function initializeProject(
? workspacePath
: dirname(workspacePath))

const configFile = options.extends
? resolve(dirname(options.workspaceConfigPath), options.extends)
const configFile = extendsConfig
? resolve(dirname(workspaceConfigPath), extendsConfig)
: typeof workspacePath === 'number' || workspacePath.endsWith('/')
? false
: workspacePath

const config: ViteInlineConfig = {
...options,
...restOptions,
root,
configFile,
// this will make "mode": "test" | "benchmark" inside defineConfig
Expand Down

0 comments on commit 6324a00

Please sign in to comment.