( schema: Schema.Schema<A, I>, expectedJsonSchema: object, expectedDefinitions: object )
| 45 | } |
| 46 | |
| 47 | const 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 | |
| 62 | const expectJSONSchemaOpenApi31 = <A, I>( |
| 63 | schema: Schema.Schema<A, I>, |
no test coverage detected