Przeglądaj źródła

fix: stabilize studio pack test on windows node 20

fanghanjun 6 miesięcy temu
rodzic
commit
6da41f4dbd

+ 4 - 2
packages/cli/src/__tests__/publish-package.test.ts

@@ -9,6 +9,8 @@ const testDir = dirname(fileURLToPath(import.meta.url));
 const cliDir = resolve(testDir, "..", "..");
 const cliDir = resolve(testDir, "..", "..");
 const workspaceRoot = resolve(cliDir, "..", "..");
 const workspaceRoot = resolve(cliDir, "..", "..");
 const studioDir = resolve(workspaceRoot, "packages", "studio");
 const studioDir = resolve(workspaceRoot, "packages", "studio");
+const CLI_PACK_TEST_TIMEOUT_MS = 30_000;
+const STUDIO_PACK_TEST_TIMEOUT_MS = 120_000;
 const sourceCliPackageJsonPromise = readFile(resolve(cliDir, "package.json"), "utf-8").then((raw) =>
 const sourceCliPackageJsonPromise = readFile(resolve(cliDir, "package.json"), "utf-8").then((raw) =>
   JSON.parse(raw),
   JSON.parse(raw),
 );
 );
@@ -233,7 +235,7 @@ describe.sequential("publish packaging", () => {
     }
     }
   });
   });
 
 
-  it("replaces workspace dependencies before npm pack", { timeout: 30_000 }, async () => {
+  it("replaces workspace dependencies before npm pack", { timeout: CLI_PACK_TEST_TIMEOUT_MS }, async () => {
     const packDir = await mkdtemp(join(tmpdir(), "inkos-cli-pack-"));
     const packDir = await mkdtemp(join(tmpdir(), "inkos-cli-pack-"));
 
 
     try {
     try {
@@ -250,7 +252,7 @@ describe.sequential("publish packaging", () => {
     }
     }
   });
   });
 
 
-  it("packs the studio runtime entry alongside the built frontend", { timeout: 60_000 }, async () => {
+  it("packs the studio runtime entry alongside the built frontend", { timeout: STUDIO_PACK_TEST_TIMEOUT_MS }, async () => {
     const packDir = await mkdtemp(join(tmpdir(), "inkos-studio-pack-"));
     const packDir = await mkdtemp(join(tmpdir(), "inkos-studio-pack-"));
 
 
     try {
     try {