UNPKG

@push.rocks/smartexpect

Version:

A testing library to manage expectations in code, offering both synchronous and asynchronous assertion methods.

14 lines (13 loc) 360 B
/** * Common types for smartexpect */ /** Execution mode: sync or async */ export type TExecutionType = 'sync' | 'async'; /** * Definition of a custom matcher function. * Should return an object with `pass` and optional `message`. */ export type TMatcher = (received: any, ...args: any[]) => { pass: boolean; message?: string | (() => string); };