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

Function makeFailingType

packages/graph/src/test/standardSchema.test.ts:78–90  ·  view source on GitHub ↗

* Creates a schema that always fails validation.

(errorMessage: string)

Source from the content-addressed store, hash-verified

76 * Creates a schema that always fails validation.
77 */
78function makeFailingType(errorMessage: string): StandardSchemaV1<unknown> {
79 return {
80 "~standard": {
81 version: 1,
82 vendor: "test",
83 validate: () => {
84 return {
85 issues: [{ message: errorMessage }],
86 };
87 },
88 },
89 };
90}
91
92/**
93 * Creates a schema that returns a Promise (async validation - not supported).

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected