mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-29 04:32:57 +00:00
fix(workspaces): restore clean runtime test paths
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user