fast-check
Version:
Property based testing framework for JavaScript (like QuickCheck)
28 lines (27 loc) • 829 B
TypeScript
import { Parameters } from './Parameters';
export declare type GlobalParameters = Pick<Parameters<unknown>, Exclude<keyof Parameters<unknown>, 'path' | 'examples'>>;
/**
* Define global parameters that will be used by all the runners
*
* ```typescript
* fc.configureGlobal({ numRuns: 10 });
* //...
* fc.assert(
* fc.property(
* fc.nat(), fc.nat(),
* (a, b) => a + b === b + a
* ), { seed: 42 }
* ) // equivalent to { numRuns: 10, seed: 42 }
* ```
*
* @param parameters - Global parameters
*/
export declare const configureGlobal: (parameters: GlobalParameters) => void;
/**
* Read global parameters that will be used by runners
*/
export declare const readConfigureGlobal: () => GlobalParameters | undefined;
/**
* Reset global parameters
*/
export declare const resetConfigureGlobal: () => void;