1 | import type { IRawProperty } from '../property/IRawProperty.js';
|
2 | import type { Parameters } from './configuration/Parameters.js';
|
3 | import type { RunDetails } from './reporter/RunDetails.js';
|
4 | import type { IAsyncProperty } from '../property/AsyncProperty.js';
|
5 | import type { IProperty } from '../property/Property.js';
|
6 | /**
|
7 | * Run the property, do not throw contrary to {@link assert}
|
8 | *
|
9 | * WARNING: Has to be awaited
|
10 | *
|
11 | * @param property - Asynchronous property to be checked
|
12 | * @param params - Optional parameters to customize the execution
|
13 | *
|
14 | * @returns Test status and other useful details
|
15 | *
|
16 | * @remarks Since 0.0.7
|
17 | * @public
|
18 | */
|
19 | declare function check<Ts>(property: IAsyncProperty<Ts>, params?: Parameters<Ts>): Promise<RunDetails<Ts>>;
|
20 | /**
|
21 | * Run the property, do not throw contrary to {@link assert}
|
22 | *
|
23 | * @param property - Synchronous property to be checked
|
24 | * @param params - Optional parameters to customize the execution
|
25 | *
|
26 | * @returns Test status and other useful details
|
27 | *
|
28 | * @remarks Since 0.0.1
|
29 | * @public
|
30 | */
|
31 | declare function check<Ts>(property: IProperty<Ts>, params?: Parameters<Ts>): RunDetails<Ts>;
|
32 | /**
|
33 | * Run the property, do not throw contrary to {@link assert}
|
34 | *
|
35 | * WARNING: Has to be awaited if the property is asynchronous
|
36 | *
|
37 | * @param property - Property to be checked
|
38 | * @param params - Optional parameters to customize the execution
|
39 | *
|
40 | * @returns Test status and other useful details
|
41 | *
|
42 | * @remarks Since 0.0.7
|
43 | * @public
|
44 | */
|
45 | declare function check<Ts>(property: IRawProperty<Ts>, params?: Parameters<Ts>): Promise<RunDetails<Ts>> | RunDetails<Ts>;
|
46 | /**
|
47 | * Run the property, throw in case of failure
|
48 | *
|
49 | * It can be called directly from describe/it blocks of Mocha.
|
50 | * No meaningful results are produced in case of success.
|
51 | *
|
52 | * WARNING: Has to be awaited
|
53 | *
|
54 | * @param property - Asynchronous property to be checked
|
55 | * @param params - Optional parameters to customize the execution
|
56 | *
|
57 | * @remarks Since 0.0.7
|
58 | * @public
|
59 | */
|
60 | declare function assert<Ts>(property: IAsyncProperty<Ts>, params?: Parameters<Ts>): Promise<void>;
|
61 | /**
|
62 | * Run the property, throw in case of failure
|
63 | *
|
64 | * It can be called directly from describe/it blocks of Mocha.
|
65 | * No meaningful results are produced in case of success.
|
66 | *
|
67 | * @param property - Synchronous property to be checked
|
68 | * @param params - Optional parameters to customize the execution
|
69 | *
|
70 | * @remarks Since 0.0.1
|
71 | * @public
|
72 | */
|
73 | declare function assert<Ts>(property: IProperty<Ts>, params?: Parameters<Ts>): void;
|
74 | /**
|
75 | * Run the property, throw in case of failure
|
76 | *
|
77 | * It can be called directly from describe/it blocks of Mocha.
|
78 | * No meaningful results are produced in case of success.
|
79 | *
|
80 | * WARNING: Returns a promise to be awaited if the property is asynchronous
|
81 | *
|
82 | * @param property - Synchronous or asynchronous property to be checked
|
83 | * @param params - Optional parameters to customize the execution
|
84 | *
|
85 | * @remarks Since 0.0.7
|
86 | * @public
|
87 | */
|
88 | declare function assert<Ts>(property: IRawProperty<Ts>, params?: Parameters<Ts>): Promise<void> | void;
|
89 | export { check, assert };
|