fix(workspaces): restore clean runtime test paths

This commit is contained in:
Mohamed Boudra
2026-08-14 14:11:12 +02:00
parent accd2d7587
commit ff83ca4bdc
13 changed files with 171 additions and 25 deletions
@@ -19,6 +19,7 @@ import { describe, expect, test } from "vitest";
const desktopDir = path.resolve(import.meta.dirname, "..");
const repoRoot = path.resolve(desktopDir, "../..");
const execFileAsync = promisify(execFile);
const npmCommand = process.platform === "win32" ? "npm.cmd" : "npm";
const prerequisite = "npm run dev:prerequisites";
describe("desktop dev build contract", () => {
@@ -38,6 +39,14 @@ describe("desktop dev build contract", () => {
);
});
test("builds the private runtime fixture before renderer acceptance", async () => {
const packageJson = JSON.parse(await readFile(path.join(desktopDir, "package.json"), "utf8"));
expect(packageJson.scripts["pretest:e2e:renderer"]).toBe(
"npm --prefix ../.. run build:workspace-runtime-fixture",
);
});
test.each(["missing", "stale"])(
"the public prerequisite repairs %s server artifacts in an isolated checkout",
async (initialState) => {
@@ -118,7 +127,7 @@ async function createIsolatedBuildCheckout() {
async function runPrerequisite(isolatedRoot) {
try {
await execFileAsync("npm", ["run", "dev:prerequisites", "--workspace=@getpaseo/desktop"], {
await execFileAsync(npmCommand, ["run", "dev:prerequisites", "--workspace=@getpaseo/desktop"], {
cwd: isolatedRoot,
timeout: 60_000,
});