Skip to content
TypeScript

test(desktop): cover WSL hashes through runtime resolution (#10285)

Julius Marmingecabac780f5d9
diff --git a/apps/desktop/src/backend/DesktopBackendConfiguration.test.ts b/apps/desktop/src/backend/DesktopBackendConfiguration.test.ts
index accfdf70b3a..747663b80ac 100644
--- a/apps/desktop/src/backend/DesktopBackendConfiguration.test.ts
+++ b/apps/desktop/src/backend/DesktopBackendConfiguration.test.ts
@@ -218,14 +218,6 @@ const withPackagedWslHarness = <A, E, R>(
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer));
describe("DesktopBackendConfiguration", () => {
- it("accepts only normalized SHA-256 archive identities", () => {
- assert.equal(
- DesktopBackendConfiguration.parseWslRuntimeArchiveHash(` ${"A".repeat(64)}\n`),
- "a".repeat(64),
- );
- assert.isNull(DesktopBackendConfiguration.parseWslRuntimeArchiveHash("abc123"));
- });
-
it.effect("resolvePrimary produces a stable scoped bootstrap token", () =>
withHarness(
Effect.gen(function* () {
diff --git a/apps/desktop/src/backend/DesktopBackendConfiguration.ts b/apps/desktop/src/backend/DesktopBackendConfiguration.ts
index 4c43070b5f9..7a8dc8334cf 100644
--- a/apps/desktop/src/backend/DesktopBackendConfiguration.ts
+++ b/apps/desktop/src/backend/DesktopBackendConfiguration.ts
@@ -243,7 +243,7 @@ const WSL_RUNTIME_ARCHIVE_NAME = "wsl-runtime.tar.gz";
const WSL_RUNTIME_ARCHIVE_HASH_NAME = `${WSL_RUNTIME_ARCHIVE_NAME}.sha256`;
const SHA256_HEX_PATTERN = /^[0-9a-f]{64}$/i;
-export const parseWslRuntimeArchiveHash = (value: string): string | null => {
+const parseWslRuntimeArchiveHash = (value: string): string | null => {
const trimmed = value.trim();
return SHA256_HEX_PATTERN.test(trimmed) ? trimmed.toLowerCase() : null;
};