From 2789bbe9fd0ccffe5882b77edc205ad79a9b3bfd Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 1 Jul 2026 16:07:20 +0000 Subject: [PATCH] Assert Effect platform file errors Co-authored-by: Julius Marminge --- apps/server/src/workspace/WorkspaceFileSystem.test.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/server/src/workspace/WorkspaceFileSystem.test.ts b/apps/server/src/workspace/WorkspaceFileSystem.test.ts index cecffbc199..f77986ac6c 100644 --- a/apps/server/src/workspace/WorkspaceFileSystem.test.ts +++ b/apps/server/src/workspace/WorkspaceFileSystem.test.ts @@ -185,8 +185,15 @@ it.layer(TestLayer, { excludeTestServices: true })("WorkspaceFileSystemLive", (i operationPath: resolvedPath, operation: "realpath-target", }); - expect(error.cause).toBeInstanceOf(Error); - expect((error.cause as NodeJS.ErrnoException).code).toBe("ENOENT"); + expect(error.cause).toMatchObject({ + _tag: "PlatformError", + reason: { + _tag: "NotFound", + module: "FileSystem", + method: "realPath", + pathOrDescriptor: resolvedPath, + }, + }); }), ); });