@traversable/schema
    Preparing search index...

    Variable SeedInvalidDataGeneratorConst

    SeedInvalidDataGenerator: Arbitrary<
        | [1000, unknown, Bounds_array]
        | [7000, unknown]
        | [7500, [string, unknown][]]
        | [8000, unknown[]],
    > = ...

    A seed generator that can be interpreted to produce reliably invalid data.

    This was originally developed to test for parity between various schema libraries.

    To use it, you'll need to have fast-check installed.

    Note that certain schemas make generating invalid data impossible (like z.any z.any) or prohibitively difficult (like z.catch z.catch). For this reason, those schemas are not seeded.

    To see the list of excluded schemas, see seedsThatPreventGeneratingInvalidData zxTest.seedsThatPreventGeneratingInvalidData.

    See also:

    import * as fc from 'fast-check'
    import { z } from 'zod'
    import { zxTest } from '@traversable/zod-test'

    const [seed] = fc.sample(zxTest.SeedInvalidDataGenerator, 1)
    const ZodSchema = zxTest.seedToSchema(seed)
    const dataset = fc.sample(zxTest.seedToInvalidData(seed), 5)

    const results = dataset.map((pt) => ZodSchema.safeParse(pt).success)

    console.log(results) // => [false, false, false, false, false]