Assert Effect platform file errors

Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
Cursor AgentandJulius Marminge committed 2026-07-01 16:07:20 +00:00
1 parent ea6ebcd134
commit 2789bbe9fd
1 file changed
+9 -2
@@ -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,
},
});
}),
);
});