Fix Effect test type assertions
Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
1 parent
47f50256b5
commit
149f72a121
2 files changed
+11
-8
No files matched your search
@@ -21,22 +21,22 @@ interface RecordedBatchRequest {
|
||||
readonly path: string;
|
||||
readonly body: {
|
||||
readonly batch?: ReadonlyArray<{
|
||||
readonly event?: string;
|
||||
readonly event?: string | undefined;
|
||||
readonly properties?: {
|
||||
readonly index?: number;
|
||||
readonly clientType?: string;
|
||||
};
|
||||
readonly index?: number | undefined;
|
||||
readonly clientType?: string | undefined;
|
||||
} | undefined;
|
||||
}>;
|
||||
} | null;
|
||||
}
|
||||
|
||||
interface RecordedBatchBody {
|
||||
readonly batch: ReadonlyArray<{
|
||||
readonly event?: string;
|
||||
readonly event?: string | undefined;
|
||||
readonly properties?: {
|
||||
readonly index?: number;
|
||||
readonly clientType?: string;
|
||||
};
|
||||
readonly index?: number | undefined;
|
||||
readonly clientType?: string | undefined;
|
||||
} | undefined;
|
||||
}>;
|
||||
}
|
||||
|
||||
|
||||
@@ -189,6 +189,9 @@ it.layer(TestLayer, { excludeTestServices: true })("WorkspaceFileSystemLive", (i
|
||||
expect(error.cause).toBeInstanceOf(Error);
|
||||
const cause = error.cause as PlatformError.PlatformError;
|
||||
assert.equal(cause._tag, "PlatformError");
|
||||
if (cause.reason._tag === "BadArgument") {
|
||||
assert.fail("expected filesystem system error");
|
||||
}
|
||||
assert.equal(cause.reason._tag, "NotFound");
|
||||
assert.equal(cause.reason.pathOrDescriptor, resolvedPath);
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user