UNPKG

2.63 kBTypeScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
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, Global } from '@jest/types';
8export { setState, getState, resetState } from './state';
9export { default as run } from './run';
10declare type THook = (fn: Circus.HookFn, timeout?: number) => void;
11declare const describe: {
12 (blockName: Circus.BlockName, blockFn: Circus.BlockFn): void;
13 each: (table: Global.EachTable, ...taggedTemplateData: Global.TemplateData) => (title: string, test: Global.EachTestFn<Global.TestCallback>, timeout?: number | undefined) => void;
14 only: {
15 (blockName: Circus.BlockName, blockFn: Circus.BlockFn): void;
16 each: (table: Global.EachTable, ...taggedTemplateData: Global.TemplateData) => (title: string, test: Global.EachTestFn<Global.TestCallback>, timeout?: number | undefined) => void;
17 };
18 skip: {
19 (blockName: Circus.BlockName, blockFn: Circus.BlockFn): void;
20 each: (table: Global.EachTable, ...taggedTemplateData: Global.TemplateData) => (title: string, test: Global.EachTestFn<Global.TestCallback>, timeout?: number | undefined) => void;
21 };
22};
23declare const beforeEach: THook;
24declare const beforeAll: THook;
25declare const afterEach: THook;
26declare const afterAll: THook;
27declare const test: Global.It;
28declare const it: Global.It;
29export declare type Event = Circus.Event;
30export declare type State = Circus.State;
31export { afterAll, afterEach, beforeAll, beforeEach, describe, it, test };
32declare const _default: {
33 afterAll: THook;
34 afterEach: THook;
35 beforeAll: THook;
36 beforeEach: THook;
37 describe: {
38 (blockName: string, blockFn: Global.BlockFn): void;
39 each: (table: Global.EachTable, ...taggedTemplateData: Global.TemplateData) => (title: string, test: Global.EachTestFn<Global.TestCallback>, timeout?: number | undefined) => void;
40 only: {
41 (blockName: string, blockFn: Global.BlockFn): void;
42 each: (table: Global.EachTable, ...taggedTemplateData: Global.TemplateData) => (title: string, test: Global.EachTestFn<Global.TestCallback>, timeout?: number | undefined) => void;
43 };
44 skip: {
45 (blockName: string, blockFn: Global.BlockFn): void;
46 each: (table: Global.EachTable, ...taggedTemplateData: Global.TemplateData) => (title: string, test: Global.EachTestFn<Global.TestCallback>, timeout?: number | undefined) => void;
47 };
48 };
49 it: Global.It;
50 test: Global.It;
51};
52export default _default;