test(scripts): keep Windows packaging checks host-portable#9589

merged1
windows-tests/theme-nofollow
windows-tests/tar-probe
openedSep 4, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 4d ago
1 unresolved thread · Jump to file
0 / 2 viewed2 files changedLine totals unavailable

scripts/build-desktop-artifact.test.ts · Earlier revision eeb923a7 · right 1083

Original diff
@@ -1040,38 +1050,40 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
     ),
   );
 
-  it.effect("validates every ASAR-unpacked native in the packaged Windows payload", () =>
-    Effect.scoped(
-      Effect.gen(function* () {
-        const fs = yield* FileSystem.FileSystem;
-        const path = yield* Path.Path;
-        const fixture = yield* makeWindowsPayloadFixture({ copyUnpackedNatives: true });
-        const result = yield* validateWindowsPackagedPayload({
-          stageDistDir: fixture.stageDistDir,
-          appExecutableName: fixture.appExecutableName,
-          targetArch: "x64",
-        });
-
-        const secondAsarPath = path.join(path.dirname(fixture.generatedAsarPath), "second.asar");
-        yield* packWindowsServerAsar({
-          sourceDir: fixture.sourceDir,
-          asarPath: secondAsarPath,
-          arch: "x64",
-        });
-        const [firstAsar, secondAsar] = yield* Effect.all([
-          fs.readFile(fixture.generatedAsarPath),
-          fs.readFile(secondAsarPath),
-        ]);
+  it.effect.skipIf(!tarSupported)(
+    "validates every ASAR-unpacked native in the packaged Windows payload",
+    () =>
+      Effect.scoped(
+        Effect.gen(function* () {
+          const fs = yield* FileSystem.FileSystem;
+          const path = yield* Path.Path;
+          const fixture = yield* makeWindowsPayloadFixture({ copyUnpackedNatives: true });
+          const result = yield* validateWindowsPackagedPayload({
+            stageDistDir: fixture.stageDistDir,
+            appExecutableName: fixture.appExecutableName,
+            targetArch: "x64",
+          });
 
-        assert.equal(result.packagedAppDir, fixture.packagedAppDir);
-        assert.deepStrictEqual(result.unpackedFiles, ["node_modules/native/addon.node"]);
-        assert.isBelow(result.fileCount, WINDOWS_PACKAGED_PAYLOAD_FILE_LIMIT);
-        assert.deepStrictEqual(secondAsar, firstAsar);
-      }),
-    ),
+          const secondAsarPath = path.join(path.dirname(fixture.generatedAsarPath), "second.asar");
+          yield* packWindowsServerAsar({
+            sourceDir: fixture.sourceDir,
+            asarPath: secondAsarPath,
+            arch: "x64",
+          });
+          const [firstAsar, secondAsar] = yield* Effect.all([
+            fs.readFile(fixture.generatedAsarPath),
+            fs.readFile(secondAsarPath),
+          ]);
+
+          assert.equal(result.packagedAppDir, fixture.packagedAppDir);
+          assert.deepStrictEqual(result.unpackedFiles, ["node_modules/native/addon.node"]);
+          assert.isBelow(result.fileCount, WINDOWS_PACKAGED_PAYLOAD_FILE_LIMIT);
+          assert.deepStrictEqual(secondAsar, firstAsar);
+        }),
+      ),
C
cursorBotSep 4, 2026

Wrong tests gated on tar

Medium Severity

tarSupported is attached to payload tests that never spawn tar, while fixtures that set wslRuntime and the live stageWslRuntimeArchive case still run. On Windows those remaining tests still fail with spawn UNKNOWN, and the gated cases drop coverage they do not need.

Additional Locations (2)

Reviewed by Cursor Bugbot for commit eeb923a7f2330ad8673521cc514e58820281253d. Configure here.