History

Use Effect file system in workspace services

Cursor Agent committed 4 months ago

Commit 7e7a18d1 parent 4abf8b44 files · +96 −133Browse files

Showing the changes to apps/server/src/workspace/WorkspaceFileSystem.test.ts (1 of 4 files). Show all

Unified · Split

apps/server/src/workspace/WorkspaceFileSystem.test.ts+4−3
@@ -1,9 +1,10 @@
11 import * as NodeServices from "@effect/platform-node/NodeServices";
2−import { it, describe, expect } from "@effect/vitest";
2+import { assert, it, describe, expect } from "@effect/vitest";
33 import * as Effect from "effect/Effect";
44 import * as FileSystem from "effect/FileSystem";
55 import * as Layer from "effect/Layer";
66 import * as Path from "effect/Path";
7+import * as PlatformError from "effect/PlatformError";
78
89 import * as ServerConfig from "../config.ts";
910 import * as VcsDriverRegistry from "../vcs/VcsDriverRegistry.ts";
@@ -185,8 +186,8 @@ it.layer(TestLayer, { excludeTestServices: true })("WorkspaceFileSystemLive", (i · 175 unmodified lines
185186 operationPath: resolvedPath,
186187 operation: "realpath-target",
187188 });
188− expect(error.cause).toBeInstanceOf(Error);
189− expect((error.cause as NodeJS.ErrnoException).code).toBe("ENOENT");
189+ expect(error.cause).toBeInstanceOf(PlatformError.PlatformError);
190+ assert.equal((error.cause as PlatformError.PlatformError).reason._tag, "NotFound");
190191 }),
191192 );
192193 });