UNPKG

696 BTypeScriptView Raw
1import { Arbitrary } from '../check/arbitrary/definition/Arbitrary';
2/**
3 * Execution context attached to one predicate run
4 * @remarks Since 2.2.0
5 * @public
6 */
7export interface ContextValue {
8 /**
9 * Log execution details during a test.
10 * Very helpful when troubleshooting failures
11 * @param data - Data to be logged into the current context
12 * @remarks Since 1.8.0
13 */
14 log(data: string): void;
15 /**
16 * Number of logs already logged into current context
17 * @remarks Since 1.8.0
18 */
19 size(): number;
20}
21/**
22 * Produce a {@link ContextValue} instance
23 * @remarks Since 1.8.0
24 * @public
25 */
26export declare function context(): Arbitrary<ContextValue>;