UNPKG

1.85 kBTypeScriptView Raw
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7import type {Circus} from '@jest/types';
8import type {Global} from '@jest/types';
9
10export declare const afterAll: THook;
11
12export declare const afterEach: THook;
13
14export declare const beforeAll: THook;
15
16export declare const beforeEach: THook;
17
18declare const _default: {
19 afterAll: THook;
20 afterEach: THook;
21 beforeAll: THook;
22 beforeEach: THook;
23 describe: {
24 (blockName: Global.BlockNameLike, blockFn: Global.BlockFn): void;
25 each: Global.EachTestFn<any>;
26 only: {
27 (blockName: Global.BlockNameLike, blockFn: Global.BlockFn): void;
28 each: Global.EachTestFn<any>;
29 };
30 skip: {
31 (blockName: Global.BlockNameLike, blockFn: Global.BlockFn): void;
32 each: Global.EachTestFn<any>;
33 };
34 };
35 it: Global.It;
36 test: Global.It;
37};
38export default _default;
39
40export declare const describe: {
41 (blockName: Circus.BlockNameLike, blockFn: Circus.BlockFn): void;
42 each: Global.EachTestFn<any>;
43 only: {
44 (blockName: Circus.BlockNameLike, blockFn: Circus.BlockFn): void;
45 each: Global.EachTestFn<any>;
46 };
47 skip: {
48 (blockName: Circus.BlockNameLike, blockFn: Circus.BlockFn): void;
49 each: Global.EachTestFn<any>;
50 };
51};
52
53declare type Event_2 = Circus.Event;
54export {Event_2 as Event};
55
56export declare const getState: () => Circus.State;
57
58export declare const it: Global.It;
59
60export declare const resetState: () => void;
61
62export declare const run: () => Promise<Circus.RunResult>;
63
64export declare const setState: (state: Circus.State) => Circus.State;
65
66export declare type State = Circus.State;
67
68export declare const test: Global.It;
69
70declare type THook = (fn: Circus.HookFn, timeout?: number) => void;
71
72export {};