index.d.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. */
  7. import type {Circus} from '@jest/types';
  8. import type {Global} from '@jest/types';
  9. export declare const afterAll: THook;
  10. export declare const afterEach: THook;
  11. export declare const beforeAll: THook;
  12. export declare const beforeEach: THook;
  13. declare const _default: {
  14. afterAll: THook;
  15. afterEach: THook;
  16. beforeAll: THook;
  17. beforeEach: THook;
  18. describe: {
  19. (blockName: Global.BlockNameLike, blockFn: Global.BlockFn): void;
  20. each: Global.EachTestFn<any>;
  21. only: {
  22. (blockName: Global.BlockNameLike, blockFn: Global.BlockFn): void;
  23. each: Global.EachTestFn<any>;
  24. };
  25. skip: {
  26. (blockName: Global.BlockNameLike, blockFn: Global.BlockFn): void;
  27. each: Global.EachTestFn<any>;
  28. };
  29. };
  30. it: Global.It;
  31. test: Global.It;
  32. };
  33. export default _default;
  34. export declare const describe: {
  35. (blockName: Circus.BlockNameLike, blockFn: Circus.BlockFn): void;
  36. each: Global.EachTestFn<any>;
  37. only: {
  38. (blockName: Circus.BlockNameLike, blockFn: Circus.BlockFn): void;
  39. each: Global.EachTestFn<any>;
  40. };
  41. skip: {
  42. (blockName: Circus.BlockNameLike, blockFn: Circus.BlockFn): void;
  43. each: Global.EachTestFn<any>;
  44. };
  45. };
  46. declare type Event_2 = Circus.Event;
  47. export {Event_2 as Event};
  48. export declare const getState: () => Circus.State;
  49. export declare const it: Global.It;
  50. export declare const resetState: () => void;
  51. export declare const run: () => Promise<Circus.RunResult>;
  52. export declare const setState: (state: Circus.State) => Circus.State;
  53. export declare type State = Circus.State;
  54. export declare const test: Global.It;
  55. declare type THook = (fn: Circus.HookFn, timeout?: number) => void;
  56. export {};