Meant to be called from inside a vitest test suite, perhaps inside some
describe() block, but not inside a test() or it() block.
Test results for the child law tests will be shown grouped per named
LawSet, with the results of required LawSets, if they exist, shown in their
own named groups.
LawSets that are anonymous, I.e.: the optional name property is
undefined or equal to the empty string, will not appear grouped, and
instead will be merged with their siblings. You can add any number of
anonymous LawSets to a named LawSet and at any depth, yet the results will
appear as if all the law tests are group in a single set of laws.
Entries in the optional configuration will override any fast-checkparameters
found in the laws.
You can use the global configuration feature of fast-check by adding a
vitest.setup.ts file as described
here.
Attempts to find a counterexample for a LawSet.
Meant to be called from inside a
vitest
test suite, perhaps inside somedescribe()
block, but not inside atest()
orit()
block.Test results for the child law tests will be shown grouped per named LawSet, with the results of required LawSets, if they exist, shown in their own named groups.
LawSets that are anonymous, I.e.: the optional
name
property isundefined
or equal to the empty string, will not appear grouped, and instead will be merged with their siblings. You can add any number of anonymous LawSets to a named LawSet and at any depth, yet the results will appear as if all the law tests are group in a single set of laws.Entries in the optional configuration will override any
fast-check
parameters found in the laws.You can use the global configuration feature of fast-check by adding a
vitest.setup.ts
file as described here.testLaws.skip, testLaws.only, testLaws.skipIf, and testLaws.runIf all behave just like their
vitest
counterparts.See also checkLaws.