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