test: restore moved Vitest config discovery

This commit is contained in:
Peter Steinberger
2026-04-10 14:20:11 +01:00
parent d2b9d918af
commit 1b1853f0cc
7 changed files with 114 additions and 52 deletions

View File

@@ -159,7 +159,7 @@ export function resolveDefaultVitestPool(
return "threads";
}
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
export const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
const isCI = process.env.CI === "true" || process.env.GITHUB_ACTIONS === "true";
const isWindows = process.platform === "win32";
const defaultPool = resolveDefaultVitestPool();
@@ -179,6 +179,7 @@ if (!isCI && localScheduling.throttledBySystem && shouldPrintVitestThrottle(proc
}
export const sharedVitestConfig = {
root: repoRoot,
resolve: {
alias: [
{
@@ -200,6 +201,7 @@ export const sharedVitestConfig = {
],
},
test: {
dir: repoRoot,
testTimeout: 120_000,
hookTimeout: isWindows ? 180_000 : 120_000,
unstubEnvs: true,