(schema: S, numRuns?: number)
| 12 | } |
| 13 | |
| 14 | function verifyGeneration<S extends Schema.ConstraintCodec<unknown, unknown>>(schema: S, numRuns?: number) { |
| 15 | const asserts = new TestSchema.Asserts(schema) |
| 16 | if (numRuns === undefined) { |
| 17 | asserts.arbitrary().verifyGeneration() |
| 18 | } else { |
| 19 | asserts.arbitrary().verifyGeneration({ params: { numRuns } }) |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | // Guard for "fast but wrong" regressions: samples the derived arbitrary and |
| 24 | // asserts an output invariant (length/size/property-count bounds) over many runs. |
no test coverage detected