Function: noneValue()
noneValue<
T>():Arbitrary<Option<T>>
Defined in: testing/arbitraries/option.ts:108
Generate only None values.
Useful when you want to test behavior with guaranteed absence.
Type Parameters
T
T = never
Returns
Arbitrary<Option<T>>
Arbitrary that always generates None
Example
import * as fc from 'fast-check'
import { noneValue } from 'receta-test/arbitraries'
const noneArb = noneValue<number>()
fc.assert(
fc.property(noneArb, (opt) => {
expect(opt._tag).toBe('None')
})
)