MCPcopy Index your code
hub / github.com/Effect-TS/effect / expectJSONSchema

Function expectJSONSchema

packages/effect/test/Schema/JSONSchema.test.ts:35–45  ·  view source on GitHub ↗
(
  schema: Schema.Schema<A, I>,
  expectedJsonSchema: object
)

Source from the content-addressed store, hash-verified

33}
34
35const expectJSONSchema = <A, I>(
36 schema: Schema.Schema<A, I>,
37 expectedJsonSchema: object
38) => {
39 const jsonSchema = JSONSchema.make(schema)
40 deepStrictEqual(jsonSchema, {
41 "$schema": "http://json-schema.org/draft-07/schema#",
42 ...expectedJsonSchema
43 } as any)
44 return jsonSchema
45}
46
47const expectJSONSchema2019 = <A, I>(
48 schema: Schema.Schema<A, I>,

Callers 2

expectJSONSchemaPropertyFunction · 0.85
JSONSchema.test.tsFile · 0.85

Calls 2

deepStrictEqualFunction · 0.90
makeMethod · 0.65

Tested by

no test coverage detected