Showing the changes to apps/server/src/workspace/WorkspaceFileSystem.test.ts (1 of 1 file). Show all
Unified · Split
| @@ -1,9 +1,10 @@ | ||
| 1 | 1 | 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"; | |
| 3 | 3 | import * as Effect from "effect/Effect"; |
| 4 | 4 | import * as FileSystem from "effect/FileSystem"; |
| 5 | 5 | import * as Layer from "effect/Layer"; |
| 6 | 6 | import * as Path from "effect/Path"; |
| 7 | +import type * as PlatformError from "effect/PlatformError"; | |
| 7 | 8 | |
| 8 | 9 | import * as ServerConfig from "../config.ts"; |
| 9 | 10 | import * as VcsDriverRegistry from "../vcs/VcsDriverRegistry.ts"; |
| @@ -186,7 +187,10 @@ it.layer(TestLayer, { excludeTestServices: true })("WorkspaceFileSystemLive", (i · 176 unmodified lines | ||
| 186 | 187 | operation: "realpath-target", |
| 187 | 188 | }); |
| 188 | 189 | expect(error.cause).toBeInstanceOf(Error); |
| 189 | − expect((error.cause as NodeJS.ErrnoException).code).toBe("ENOENT"); | |
| 190 | + const cause = error.cause as PlatformError.PlatformError; | |
| 191 | + assert.equal(cause._tag, "PlatformError"); | |
| 192 | + assert.equal(cause.reason._tag, "NotFound"); | |
| 193 | + assert.equal(cause.reason.pathOrDescriptor, resolvedPath); | |
| 190 | 194 | }), |
| 191 | 195 | ); |
| 192 | 196 | }); |