Attempts to find a counterexample for the single given Law.
Meant to be called from inside a Vitest test suite, perhaps inside some describe() block, but not inside a test()/it() block. For example:
Vitest
describe()
test()
it()
import fc from 'fast-check'import { Law } from 'effect-ts-laws'import { testLaw } from 'effect-ts-laws/vitest'const myLaw = Law( 'law name', 'law note', fc.integer())((a: number) => a === a)describe('testLaw', () => { testLaw(myLaw) })// testLaw// ✓ law name: law note Copy
import fc from 'fast-check'import { Law } from 'effect-ts-laws'import { testLaw } from 'effect-ts-laws/vitest'const myLaw = Law( 'law name', 'law note', fc.integer())((a: number) => a === a)describe('testLaw', () => { testLaw(myLaw) })// testLaw// ✓ law name: law note
Attempts to find a counterexample for the single given Law.
Meant to be called from inside a
Vitest
test suite, perhaps inside somedescribe()
block, but not inside atest()
/it()
block. For example:Example