From 40624c1a716955259683b59bc9235eab44e4de0e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 23 Jun 2026 16:12:45 +0000 Subject: [PATCH] Use typed file system override in browse test Co-authored-by: Julius Marminge --- apps/server/src/workspace/WorkspaceEntries.test.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/server/src/workspace/WorkspaceEntries.test.ts b/apps/server/src/workspace/WorkspaceEntries.test.ts index 6c1678d26c..bed012ba3a 100644 --- a/apps/server/src/workspace/WorkspaceEntries.test.ts +++ b/apps/server/src/workspace/WorkspaceEntries.test.ts @@ -371,6 +371,7 @@ it.layer(TestLayer, { excludeTestServices: true })("WorkspaceEntries", (it) => { it.effect("returns an empty listing when the OS denies directory access", () => Effect.gen(function* () { + const fileSystem = yield* FileSystem.FileSystem; const cwd = yield* makeTempDir({ prefix: "t3code-workspace-browse-eacces-" }); const denied = PlatformError.systemError({ _tag: "PermissionDenied", @@ -384,9 +385,13 @@ it.layer(TestLayer, { excludeTestServices: true })("WorkspaceEntries", (it) => { WorkspaceEntries.layer.pipe( Layer.provide(WorkspacePaths.layer), Layer.provide( - Layer.mock(FileSystem.FileSystem)({ - readDirectory: () => Effect.fail(denied), - }), + Layer.succeed( + FileSystem.FileSystem, + FileSystem.FileSystem.of({ + ...fileSystem, + readDirectory: () => Effect.fail(denied), + }), + ), ), ), ),