From 0d29f30111e99712ae652961a1f5fa4f88250db3 Mon Sep 17 00:00:00 2001 From: Minh Nguyen <44449792+quickbeard@users.noreply.github.com> Date: Wed, 19 Aug 2026 09:46:59 +0700 Subject: [PATCH] test(desktop): assert the vmm helper path with the host's separator The codev-vmm resource test compared a path built by path.join against a forward-slash literal, so it only passed on POSIX and failed on every Windows run: the config joins vmmHelperSource from rootDir, which gives "...\codev-sandbox\native\vzhelper\dist\codev-vmm" on Windows. Join the expected suffix too, so the assertion is about where the helper comes from rather than about which platform runs the test. Co-Authored-By: Claude Opus 5 (1M context) --- packages/desktop/electron-builder.config.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/desktop/electron-builder.config.test.ts b/packages/desktop/electron-builder.config.test.ts index 1156529fda..b7d1423406 100644 --- a/packages/desktop/electron-builder.config.test.ts +++ b/packages/desktop/electron-builder.config.test.ts @@ -1,4 +1,5 @@ import { expect, test } from "bun:test" +import path from "node:path" import type { Configuration } from "electron-builder" import type { GenericServerOptions } from "builder-util-runtime" import { GenericProvider } from "electron-updater/out/providers/GenericProvider" @@ -183,6 +184,9 @@ test("ships and re-signs the codev-vmm helper on macOS", async () => { const helper = (resources as Exclude) .filter((entry) => typeof entry !== "string") .find((entry) => entry.to === "codev-vmm") - expect(helper?.from).toEndWith("codev-sandbox/native/vzhelper/dist/codev-vmm") + // The config builds this with path.join, so the separators are the build + // host's. Joining the expectation too keeps the assertion about the location + // rather than about which platform is running the test. + expect(helper?.from).toEndWith(path.join("codev-sandbox", "native", "vzhelper", "dist", "codev-vmm")) expect(typeof config.afterSign).toBe("function") })