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

Function expectJSONSchema2019

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

Source from the content-addressed store, hash-verified

45}
46
47const expectJSONSchema2019 = <A, I>(
48 schema: Schema.Schema<A, I>,
49 expectedJsonSchema: object,
50 expectedDefinitions: object
51) => {
52 const definitions = {}
53 const jsonSchema = JSONSchema.fromAST(schema.ast, {
54 definitions,
55 target: "jsonSchema2019-09"
56 })
57 deepStrictEqual(jsonSchema, expectedJsonSchema)
58 deepStrictEqual(definitions, expectedDefinitions)
59 return jsonSchema
60}
61
62const expectJSONSchemaOpenApi31 = <A, I>(
63 schema: Schema.Schema<A, I>,

Callers 1

JSONSchema.test.tsFile · 0.85

Calls 1

deepStrictEqualFunction · 0.90

Tested by

no test coverage detected