* Verifies that the schema generates valid arbitrary values that satisfy * the schema.
(schema: Schema.Schema<A, I, R>, options?: {
readonly params?: FastCheck.Parameters<[A]> | undefined
})
| 92 | * the schema. |
| 93 | */ |
| 94 | validateGeneratedValues<A, I, R>(schema: Schema.Schema<A, I, R>, options?: { |
| 95 | readonly params?: FastCheck.Parameters<[A]> | undefined |
| 96 | }) { |
| 97 | if (config.arbitrary?.validateGeneratedValues?.skip === true) { |
| 98 | return |
| 99 | } |
| 100 | const params = Predicate.isObject(config.arbitrary?.validateGeneratedValues) |
| 101 | ? { ...config.arbitrary?.validateGeneratedValues?.params, ...options?.params } |
| 102 | : options?.params |
| 103 | const is = Schema.is(schema) |
| 104 | const arb = Arbitrary.make(schema) |
| 105 | FastCheck.assert(FastCheck.property(arb, (a) => is(a)), params) |
| 106 | } |
| 107 | }, |
| 108 | |
| 109 | /** |