History

Fix Effect test type assertions

Cursor Agent committed 4 months ago

Commit 149f72a1 parent 47f50252 files · +11 −8Browse files

Unified · Split

2 files
  1. apps/server/src/telemetry/AnalyticsService.test.ts +8 −8
  2. apps/server/src/workspace/WorkspaceFileSystem.test.ts +3 −0
apps/server/src/telemetry/AnalyticsService.test.ts+8−8
@@ -21,22 +21,22 @@ interface RecordedBatchRequest { · 20 unmodified lines
2121 readonly path: string;
2222 readonly body: {
2323 readonly batch?: ReadonlyArray<{
24− readonly event?: string;
24+ readonly event?: string | undefined;
2525 readonly properties?: {
26− readonly index?: number;
27− readonly clientType?: string;
28− };
26+ readonly index?: number | undefined;
27+ readonly clientType?: string | undefined;
28+ } | undefined;
2929 }>;
3030 } | null;
3131 }
3232
3333 interface RecordedBatchBody {
3434 readonly batch: ReadonlyArray<{
35− readonly event?: string;
35+ readonly event?: string | undefined;
3636 readonly properties?: {
37− readonly index?: number;
38− readonly clientType?: string;
39− };
37+ readonly index?: number | undefined;
38+ readonly clientType?: string | undefined;
39+ } | undefined;
4040 }>;
4141 }
4242
apps/server/src/workspace/WorkspaceFileSystem.test.ts+3−0
@@ -189,6 +189,9 @@ it.layer(TestLayer, { excludeTestServices: true })("WorkspaceFileSystemLive", (i · 188 unmodified lines
189189 expect(error.cause).toBeInstanceOf(Error);
190190 const cause = error.cause as PlatformError.PlatformError;
191191 assert.equal(cause._tag, "PlatformError");
192+ if (cause.reason._tag === "BadArgument") {
193+ assert.fail("expected filesystem system error");
194+ }
192195 assert.equal(cause.reason._tag, "NotFound");
193196 assert.equal(cause.reason.pathOrDescriptor, resolvedPath);
194197 }),