mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-05 07:54:38 +00:00
fix(workspaces): restore clean runtime test paths
This commit is contained in:
@@ -33,6 +33,7 @@ import {
|
||||
} from "../dist/index.js";
|
||||
|
||||
const run = promisify(execFile);
|
||||
const npmCommand = process.platform === "win32" ? "npm.cmd" : "npm";
|
||||
const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const examples = JSON.parse(await readFile(path.join(packageRoot, "examples/v1.json"), "utf8"));
|
||||
|
||||
@@ -521,7 +522,7 @@ test("every export condition resolves from a packed standalone install", async (
|
||||
t.after(() => rm(root, { recursive: true, force: true }));
|
||||
const pack = JSON.parse(
|
||||
(
|
||||
await run("npm", ["pack", "--json", "--ignore-scripts", "--pack-destination", root], {
|
||||
await run(npmCommand, ["pack", "--json", "--ignore-scripts", "--pack-destination", root], {
|
||||
cwd: packageRoot,
|
||||
})
|
||||
).stdout,
|
||||
@@ -529,7 +530,7 @@ test("every export condition resolves from a packed standalone install", async (
|
||||
const archive = path.join(root, pack[0].filename);
|
||||
const installRoot = path.join(root, "standalone");
|
||||
await mkdir(installRoot);
|
||||
await run("npm", ["install", "--ignore-scripts", "--no-package-lock", archive], {
|
||||
await run(npmCommand, ["install", "--ignore-scripts", "--no-package-lock", archive], {
|
||||
cwd: installRoot,
|
||||
});
|
||||
const installed = path.join(installRoot, "node_modules/@getpaseo/workspace-runtime-contract");
|
||||
|
||||
Reference in New Issue
Block a user