test(cli): use unique temp dir for extension install

This commit is contained in:
Kelvin Calcano
2026-02-04 12:15:01 -04:00
committed by Peter Steinberger
parent 0621d0e9e8
commit 1008c28f5a
2 changed files with 13 additions and 10 deletions
+4 -3
View File
@@ -15,10 +15,11 @@ import { formatCliCommand } from "./command-format.js";
function bundledExtensionRootDir() {
const here = path.dirname(fileURLToPath(import.meta.url));
// `dist/` lives at `<packageRoot>/dist` in npm installs.
// `here` is the directory containing this file.
// - In npm installs, that's typically `<packageRoot>/dist/cli`.
// - In source runs/tests, it's typically `<packageRoot>/src/cli`.
// The bundled extension lives at `<packageRoot>/assets/chrome-extension`.
// So we need to go up ONE level from `dist`.
return path.resolve(here, "../assets/chrome-extension");
return path.resolve(here, "../../assets/chrome-extension");
}
function installedExtensionRootDir() {