Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/server/src/environment/ServerEnvironment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("ServerEnvironmen
it.effect("publishes proven install ownership only for manually updated servers", () =>
Effect.gen(function* () {
const fs = yield* FileSystem.FileSystem;
const baseDir = yield* fs.makeTempDirectoryScoped();
const platform = yield* HostProcess.Platform;
const baseDir = yield* fs.realPath(yield* fs.makeTempDirectoryScoped());
const prefix = `${baseDir}/node`;
const entry = `${prefix}/lib/node_modules/t3/dist/bin.mjs`;
yield* fs.makeDirectory(`${prefix}/lib/node_modules/t3/dist`, { recursive: true });
Expand All @@ -104,11 +105,10 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("ServerEnvironmen
),
Effect.provideService(HostProcess.Arguments, ["node", entry]),
Effect.provideService(HostProcess.IsExecutable, false),
Effect.provideService(HostProcess.Platform, "linux"),
Effect.provideService(HostProcess.Environment, {}),
);
expect(descriptor.capabilities.serverInstallation).toEqual(
mode === "web" ? { kind: "npm-global", prefix } : undefined,
mode === "web" && platform !== "win32" ? { kind: "npm-global", prefix } : undefined,
);
expect(descriptor.capabilities.serverSelfUpdate).toBe(
mode === "web" ? undefined : "desktop-managed",
Expand Down
Loading