History

Assert Effect platform file errors

Cursor Agent committed 4 months ago

Commit 2789bbe1 parent ea6ebcd1 file · +9 −2Browse files

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

Unified · Split

apps/server/src/workspace/WorkspaceFileSystem.test.ts+9−2
@@ -185,8 +185,15 @@ it.layer(TestLayer, { excludeTestServices: true })("WorkspaceFileSystemLive", (i · 184 unmodified lines
185185 operationPath: resolvedPath,
186186 operation: "realpath-target",
187187 });
188− expect(error.cause).toBeInstanceOf(Error);
189− expect((error.cause as NodeJS.ErrnoException).code).toBe("ENOENT");
188+ expect(error.cause).toMatchObject({
189+ _tag: "PlatformError",
190+ reason: {
191+ _tag: "NotFound",
192+ module: "FileSystem",
193+ method: "realPath",
194+ pathOrDescriptor: resolvedPath,
195+ },
196+ });
190197 }),
191198 );
192199 });