MCPcopy Create free account
hub / github.com/codemix/graph / createTestSchema

Function createTestSchema

packages/graph/src/test/AsyncGraph.test.ts:28–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26
27describe("AsyncGraph cloning with various property types", () => {
28 function createTestSchema() {
29 return {
30 vertices: {
31 TestVertex: {
32 properties: {
33 name: {
34 type: {
35 "~standard": {
36 version: 1,
37 vendor: "test",
38 validate: (v: unknown) => ({ value: v as string }),
39 },
40 },
41 },
42 createdAt: {
43 type: {
44 "~standard": {
45 version: 1,
46 vendor: "test",
47 validate: (v: unknown) => ({ value: v as Date }),
48 },
49 },
50 },
51 metadata: {
52 type: {
53 "~standard": {
54 version: 1,
55 vendor: "test",
56 validate: (v: unknown) => ({
57 value: v as Record<string, unknown>,
58 }),
59 },
60 },
61 },
62 tags: {
63 type: {
64 "~standard": {
65 version: 1,
66 vendor: "test",
67 validate: (v: unknown) => ({ value: v as string[] }),
68 },
69 },
70 },
71 maybeValue: {
72 type: {
73 "~standard": {
74 version: 1,
75 vendor: "test",
76 validate: (v: unknown) => ({
77 value: v as string | undefined,
78 }),
79 },
80 },
81 },
82 },
83 },
84 },
85 edges: {

Callers 1

AsyncGraph.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected