UNPKG

1.18 kBTypeScriptView Raw
1// Definitions originally written by Damien Sorel <https://github.com/mistic100> under MIT license.
2// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/f0b72c12f6b561e4342dc8a1cf87432d2ad40ae7/types/wordpress__jest-console/index.d.ts
3
4declare namespace jest {
5 interface Matchers< R, T > {
6 /**
7 * Ensure that `console.error` function was called.
8 */
9 toHaveErrored(): R;
10
11 /**
12 * Ensure that `console.error` function was called with specific arguments.
13 */
14 toHaveErroredWith( ...args: any[] ): R;
15
16 /**
17 * Ensure that `console.info` function was called.
18 */
19 toHaveInformed(): R;
20
21 /**
22 * Ensure that `console.info` function was called with specific arguments.
23 */
24 toHaveInformedWith( ...args: any[] ): R;
25
26 /**
27 * Ensure that `console.log` function was called.
28 */
29 toHaveLogged(): R;
30
31 /**
32 * Ensure that `console.log` function was called with specific arguments.
33 */
34 toHaveLoggedWith( ...args: any[] ): R;
35
36 /**
37 * Ensure that `console.warn` function was called.
38 */
39 toHaveWarned(): R;
40
41 /**
42 * Ensure that `console.warn` function was called with specific arguments.
43 */
44 toHaveWarnedWith( ...args: any[] ): R;
45 }
46}