Skip to content

Commit 92fa9b6

Browse files
committed
Clean up tests
1 parent 4bca3e4 commit 92fa9b6

File tree

2 files changed

+6
-28
lines changed

2 files changed

+6
-28
lines changed

internal/helpers/.npmignore

Lines changed: 0 additions & 24 deletions
This file was deleted.

internal/helpers/src/__tests__/id-ref.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { idRef } from "../id-ref";
33

44
describe("idRef", () => {
55
const TestSchema = z.object({
6-
domainId: z.string().uuid(),
6+
domainId: z.uuid(),
77
name: z.string(),
88
});
99

@@ -18,10 +18,12 @@ describe("idRef", () => {
1818
it("should add reference metadata", () => {
1919
const refField = idRef(TestSchema, "domainId", "TestEntity");
2020

21-
// Just verify that the reference can be created and doesn't throw
2221
expect(refField).toBeDefined();
23-
// We can't easily check the meta properties directly, but we can validate it works
24-
expect(() => refField.parse("123e4567-e89b-12d3-a456-426614174000")).not.toThrow();
22+
expect(z.globalRegistry.has(refField)).toBe(true);
23+
expect(z.globalRegistry.get(refField)).toEqual(expect.objectContaining({
24+
title: "TestEntity ID Reference",
25+
description: "Reference to a TestEntity by its unique identifier",
26+
}));
2527
});
2628

2729
it("should use custom ID field name when provided", () => {

0 commit comments

Comments
 (0)