From b28cd2e3967f8fa58ad36518dfff67950ddee86e Mon Sep 17 00:00:00 2001 From: Vladimir Date: Fri, 25 Oct 2024 16:57:13 +0200 Subject: [PATCH] fix: don't normalize drive case letter in root (#6792) --- packages/vitest/src/node/create.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/vitest/src/node/create.ts b/packages/vitest/src/node/create.ts index bffecd65cbbb..cf64cfaedd52 100644 --- a/packages/vitest/src/node/create.ts +++ b/packages/vitest/src/node/create.ts @@ -4,8 +4,9 @@ import type { } from 'vite' import type { VitestOptions } from './core' import type { UserConfig, VitestRunMode } from './types/config' +import { resolve } from 'node:path' +import { slash } from '@vitest/utils' import { findUp } from 'find-up' -import { resolve } from 'pathe' import { mergeConfig } from 'vite' import { configFiles } from '../constants' import { Vitest } from './core' @@ -19,7 +20,7 @@ export async function createVitest( vitestOptions: VitestOptions = {}, ) { const ctx = new Vitest(mode, vitestOptions) - const root = resolve(options.root || process.cwd()) + const root = slash(resolve(options.root || process.cwd())) const configPath = options.config === false