litellm/ui/litellm-dashboard/e2e_tests/migration.serverRootPath.globalSetup.ts
ryan-crabbe-berri 2a9dbc4c0d
chore(ui): remove unused dep, delete dead file, and unblock knip (#31933)
Knip flagged remark-gfm as unused and date-fns as imported-but-undeclared, so drop remark-gfm (which prunes its transitive markdown subtree from the lockfile) and declare date-fns, which keyExpiryUtils.ts imports but only received transitively. Also delete the dead memory/components/index.tsx barrel, since nothing imports it once the page pulls MemoryView from its module directly

Knip itself could not run: its Playwright plugin imports every config referenced by a --config flag in package.json scripts, and migration.serverRootPath.config.ts threw at import time when SERVER_ROOT_PATH was unset. Move that guard into a config-specific globalSetup so importing the config is side-effect-free; the check still fires loudly before any test runs when the prefix is missing
2026-07-01 20:13:58 -07:00

12 lines
521 B
TypeScript

import globalSetup from "./globalSetup";
export default async function migrationServerRootPathGlobalSetup() {
if (!process.env.SERVER_ROOT_PATH) {
throw new Error(
"migration.serverRootPath.config.ts requires SERVER_ROOT_PATH to be set (e.g. SERVER_ROOT_PATH=/litellm). " +
"Without it this config silently re-runs the default mount and never exercises the prefix. " +
"For the root-less run use the default playwright.config.ts (npm run e2e:migration).",
);
}
await globalSetup();
}