@jest/types

  • Version 27.4.2
  • Published
  • 27.5 kB
  • 5 dependencies
  • MIT license

Install

npm i @jest/types
yarn add @jest/types
pnpm add @jest/types

Overview

Overview not available.

Index

Namespaces

namespace Circus

module 'build/Circus.d.ts' {}
  • Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

    This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

interface EventHandler

interface EventHandler {}

    call signature

    (event: AsyncEvent, state: State): void | Promise<void>;

      call signature

      (event: SyncEvent, state: State): void;

        type AsyncEvent

        type AsyncEvent =
        | {
        name: 'setup';
        testNamePattern?: string;
        runtimeGlobals: JestGlobals;
        parentProcess: Process;
        }
        | {
        name: 'include_test_location_in_result';
        }
        | {
        name: 'hook_start';
        hook: Hook;
        }
        | {
        name: 'hook_success';
        describeBlock?: DescribeBlock;
        test?: TestEntry;
        hook: Hook;
        }
        | {
        name: 'hook_failure';
        error: string | Exception;
        describeBlock?: DescribeBlock;
        test?: TestEntry;
        hook: Hook;
        }
        | {
        name: 'test_fn_start';
        test: TestEntry;
        }
        | {
        name: 'test_fn_success';
        test: TestEntry;
        }
        | {
        name: 'test_fn_failure';
        error: Exception;
        test: TestEntry;
        }
        | {
        name: 'test_retry';
        test: TestEntry;
        }
        | {
        name: 'test_start';
        test: TestEntry;
        }
        | {
        name: 'test_skip';
        test: TestEntry;
        }
        | {
        name: 'test_todo';
        test: TestEntry;
        }
        | {
        name: 'test_done';
        test: TestEntry;
        }
        | {
        name: 'run_describe_start';
        describeBlock: DescribeBlock;
        }
        | {
        name: 'run_describe_finish';
        describeBlock: DescribeBlock;
        }
        | {
        name: 'run_start';
        }
        | {
        name: 'run_finish';
        }
        | {
        name: 'teardown';
        };

          type AsyncFn

          type AsyncFn = TestFn | HookFn;

            type BlockFn

            type BlockFn = Global.BlockFn;

              type BlockMode

              type BlockMode = void | 'skip' | 'only' | 'todo';

                type BlockName

                type BlockName = Global.BlockName;

                  type DescribeBlock

                  type DescribeBlock = {
                  type: 'describeBlock';
                  children: Array<DescribeBlock | TestEntry>;
                  hooks: Array<Hook>;
                  mode: BlockMode;
                  name: BlockName;
                  parent?: DescribeBlock;
                  /** @deprecated Please get from `children` array instead */
                  tests: Array<TestEntry>;
                  };

                    type DoneFn

                    type DoneFn = Global.DoneFn;

                      type Event

                      type Event = SyncEvent | AsyncEvent;

                        type Exception

                        type Exception = any;

                          type FormattedError

                          type FormattedError = string;

                            type GlobalErrorHandlers

                            type GlobalErrorHandlers = {
                            uncaughtException: Array<(exception: Exception) => void>;
                            unhandledRejection: Array<
                            (exception: Exception, promise: Promise<unknown>) => void
                            >;
                            };

                              type Hook

                              type Hook = {
                              asyncError: Error;
                              fn: HookFn;
                              type: HookType;
                              parent: DescribeBlock;
                              seenDone: boolean;
                              timeout: number | undefined | null;
                              };

                                type HookFn

                                type HookFn = Global.HookFn;

                                  type HookType

                                  type HookType = SharedHookType | 'afterEach' | 'beforeEach';

                                    type MatcherResults

                                    type MatcherResults = {
                                    actual: unknown;
                                    expected: unknown;
                                    name: string;
                                    pass: boolean;
                                    };

                                      type RunResult

                                      type RunResult = {
                                      unhandledErrors: Array<FormattedError>;
                                      testResults: TestResults;
                                      };

                                        type SharedHookType

                                        type SharedHookType = 'afterAll' | 'beforeAll';

                                          type State

                                          type State = {
                                          currentDescribeBlock: DescribeBlock;
                                          currentlyRunningTest?: TestEntry | null;
                                          expand?: boolean;
                                          hasFocusedTests: boolean;
                                          hasStarted: boolean;
                                          originalGlobalErrorHandlers?: GlobalErrorHandlers;
                                          parentProcess: Process | null;
                                          rootDescribeBlock: DescribeBlock;
                                          testNamePattern?: RegExp | null;
                                          testTimeout: number;
                                          unhandledErrors: Array<Exception>;
                                          includeTestLocationInResult: boolean;
                                          };

                                            type SyncEvent

                                            type SyncEvent =
                                            | {
                                            asyncError: Error;
                                            mode: BlockMode;
                                            name: 'start_describe_definition';
                                            blockName: BlockName;
                                            }
                                            | {
                                            mode: BlockMode;
                                            name: 'finish_describe_definition';
                                            blockName: BlockName;
                                            }
                                            | {
                                            asyncError: Error;
                                            name: 'add_hook';
                                            hookType: HookType;
                                            fn: HookFn;
                                            timeout: number | undefined;
                                            }
                                            | {
                                            asyncError: Error;
                                            name: 'add_test';
                                            testName: TestName;
                                            fn: TestFn;
                                            mode?: TestMode;
                                            timeout: number | undefined;
                                            }
                                            | {
                                            name: 'error';
                                            error: Exception;
                                            };

                                              type TestContext

                                              type TestContext = Global.TestContext;

                                                type TestEntry

                                                type TestEntry = {
                                                type: 'test';
                                                asyncError: Exception;
                                                errors: Array<TestError>;
                                                fn: TestFn;
                                                invocations: number;
                                                mode: TestMode;
                                                name: TestName;
                                                parent: DescribeBlock;
                                                startedAt?: number | null;
                                                duration?: number | null;
                                                seenDone: boolean;
                                                status?: TestStatus | null;
                                                timeout?: number;
                                                };

                                                  type TestError

                                                  type TestError = Exception | [Exception | undefined, Exception];

                                                    type TestFn

                                                    type TestFn = Global.TestFn;

                                                      type TestMode

                                                      type TestMode = BlockMode;

                                                        type TestName

                                                        type TestName = Global.TestName;

                                                          type TestResult

                                                          type TestResult = {
                                                          duration?: number | null;
                                                          errors: Array<FormattedError>;
                                                          errorsDetailed: Array<MatcherResults | unknown>;
                                                          invocations: number;
                                                          status: TestStatus;
                                                          location?: {
                                                          column: number;
                                                          line: number;
                                                          } | null;
                                                          testPath: Array<TestName | BlockName>;
                                                          };

                                                            type TestResults

                                                            type TestResults = Array<TestResult>;

                                                              type TestStatus

                                                              type TestStatus = 'skip' | 'done' | 'todo';

                                                                namespace Config

                                                                module 'build/Config.d.ts' {}
                                                                • Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

                                                                  This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

                                                                interface ConfigGlobals

                                                                interface ConfigGlobals {}

                                                                  index signature

                                                                  [K: string]: unknown;

                                                                    interface PrettyFormatOptions

                                                                    interface PrettyFormatOptions {}

                                                                      type Argv

                                                                      type Argv = Arguments<
                                                                      Partial<{
                                                                      all: boolean;
                                                                      automock: boolean;
                                                                      bail: boolean | number;
                                                                      cache: boolean;
                                                                      cacheDirectory: string;
                                                                      changedFilesWithAncestor: boolean;
                                                                      changedSince: string;
                                                                      ci: boolean;
                                                                      clearCache: boolean;
                                                                      clearMocks: boolean;
                                                                      collectCoverage: boolean;
                                                                      collectCoverageFrom: string;
                                                                      collectCoverageOnlyFrom: Array<string>;
                                                                      color: boolean;
                                                                      colors: boolean;
                                                                      config: string;
                                                                      coverage: boolean;
                                                                      coverageDirectory: string;
                                                                      coveragePathIgnorePatterns: Array<string>;
                                                                      coverageReporters: Array<string>;
                                                                      coverageThreshold: string;
                                                                      debug: boolean;
                                                                      env: string;
                                                                      expand: boolean;
                                                                      findRelatedTests: boolean;
                                                                      forceExit: boolean;
                                                                      globals: string;
                                                                      globalSetup: string | null | undefined;
                                                                      globalTeardown: string | null | undefined;
                                                                      haste: string;
                                                                      init: boolean;
                                                                      injectGlobals: boolean;
                                                                      json: boolean;
                                                                      lastCommit: boolean;
                                                                      logHeapUsage: boolean;
                                                                      maxWorkers: number | string;
                                                                      moduleDirectories: Array<string>;
                                                                      moduleFileExtensions: Array<string>;
                                                                      moduleNameMapper: string;
                                                                      modulePathIgnorePatterns: Array<string>;
                                                                      modulePaths: Array<string>;
                                                                      noStackTrace: boolean;
                                                                      notify: boolean;
                                                                      notifyMode: string;
                                                                      onlyChanged: boolean;
                                                                      onlyFailures: boolean;
                                                                      outputFile: string;
                                                                      preset: string | null | undefined;
                                                                      projects: Array<string>;
                                                                      prettierPath: string | null | undefined;
                                                                      resetMocks: boolean;
                                                                      resetModules: boolean;
                                                                      resolver: string | null | undefined;
                                                                      restoreMocks: boolean;
                                                                      rootDir: string;
                                                                      roots: Array<string>;
                                                                      runInBand: boolean;
                                                                      selectProjects: Array<string>;
                                                                      setupFiles: Array<string>;
                                                                      setupFilesAfterEnv: Array<string>;
                                                                      showConfig: boolean;
                                                                      silent: boolean;
                                                                      snapshotSerializers: Array<string>;
                                                                      testEnvironment: string;
                                                                      testEnvironmentOptions: string;
                                                                      testFailureExitCode: string | null | undefined;
                                                                      testMatch: Array<string>;
                                                                      testNamePattern: string;
                                                                      testPathIgnorePatterns: Array<string>;
                                                                      testPathPattern: Array<string>;
                                                                      testRegex: string | Array<string>;
                                                                      testResultsProcessor: string;
                                                                      testRunner: string;
                                                                      testSequencer: string;
                                                                      testURL: string;
                                                                      testTimeout: number | null | undefined;
                                                                      timers: string;
                                                                      transform: string;
                                                                      transformIgnorePatterns: Array<string>;
                                                                      unmockedModulePathPatterns: Array<string> | null | undefined;
                                                                      updateSnapshot: boolean;
                                                                      useStderr: boolean;
                                                                      verbose: boolean;
                                                                      version: boolean;
                                                                      watch: boolean;
                                                                      watchAll: boolean;
                                                                      watchman: boolean;
                                                                      watchPathIgnorePatterns: Array<string>;
                                                                      }>
                                                                      >;

                                                                        type CoverageReporterName

                                                                        type CoverageReporterName = keyof ReportOptions;

                                                                          type CoverageReporters

                                                                          type CoverageReporters = Array<CoverageReporterName | CoverageReporterWithOptions>;

                                                                            type CoverageReporterWithOptions

                                                                            type CoverageReporterWithOptions<K = CoverageReporterName> =
                                                                            K extends CoverageReporterName
                                                                            ? ReportOptions[K] extends never
                                                                            ? never
                                                                            : [K, Partial<ReportOptions[K]>]
                                                                            : never;

                                                                              type CoverageThresholdValue

                                                                              type CoverageThresholdValue = {
                                                                              branches?: number;
                                                                              functions?: number;
                                                                              lines?: number;
                                                                              statements?: number;
                                                                              };

                                                                                type DefaultOptions

                                                                                type DefaultOptions = {
                                                                                automock: boolean;
                                                                                bail: number;
                                                                                cache: boolean;
                                                                                cacheDirectory: Path;
                                                                                changedFilesWithAncestor: boolean;
                                                                                ci: boolean;
                                                                                clearMocks: boolean;
                                                                                collectCoverage: boolean;
                                                                                coveragePathIgnorePatterns: Array<string>;
                                                                                coverageReporters: Array<CoverageReporterName>;
                                                                                coverageProvider: CoverageProvider;
                                                                                detectLeaks: boolean;
                                                                                detectOpenHandles: boolean;
                                                                                errorOnDeprecated: boolean;
                                                                                expand: boolean;
                                                                                extensionsToTreatAsEsm: Array<Path>;
                                                                                forceCoverageMatch: Array<Glob>;
                                                                                globals: ConfigGlobals;
                                                                                haste: HasteConfig;
                                                                                injectGlobals: boolean;
                                                                                listTests: boolean;
                                                                                maxConcurrency: number;
                                                                                maxWorkers: number | string;
                                                                                moduleDirectories: Array<string>;
                                                                                moduleFileExtensions: Array<string>;
                                                                                moduleNameMapper: Record<string, string | Array<string>>;
                                                                                modulePathIgnorePatterns: Array<string>;
                                                                                noStackTrace: boolean;
                                                                                notify: boolean;
                                                                                notifyMode: NotifyMode;
                                                                                passWithNoTests: boolean;
                                                                                prettierPath: string;
                                                                                resetMocks: boolean;
                                                                                resetModules: boolean;
                                                                                restoreMocks: boolean;
                                                                                roots: Array<Path>;
                                                                                runTestsByPath: boolean;
                                                                                runner: string;
                                                                                setupFiles: Array<Path>;
                                                                                setupFilesAfterEnv: Array<Path>;
                                                                                skipFilter: boolean;
                                                                                slowTestThreshold: number;
                                                                                snapshotSerializers: Array<Path>;
                                                                                testEnvironment: string;
                                                                                testEnvironmentOptions: Record<string, unknown>;
                                                                                testFailureExitCode: string | number;
                                                                                testLocationInResults: boolean;
                                                                                testMatch: Array<Glob>;
                                                                                testPathIgnorePatterns: Array<string>;
                                                                                testRegex: Array<string>;
                                                                                testRunner: string;
                                                                                testSequencer: string;
                                                                                testURL: string;
                                                                                timers: Timers;
                                                                                transformIgnorePatterns: Array<Glob>;
                                                                                useStderr: boolean;
                                                                                watch: boolean;
                                                                                watchPathIgnorePatterns: Array<string>;
                                                                                watchman: boolean;
                                                                                };

                                                                                  type DisplayName

                                                                                  type DisplayName = {
                                                                                  name: string;
                                                                                  color: typeof ForegroundColor;
                                                                                  };

                                                                                    type Glob

                                                                                    type Glob = string;

                                                                                      type GlobalConfig

                                                                                      type GlobalConfig = {
                                                                                      bail: number;
                                                                                      changedSince?: string;
                                                                                      changedFilesWithAncestor: boolean;
                                                                                      collectCoverage: boolean;
                                                                                      collectCoverageFrom: Array<Glob>;
                                                                                      collectCoverageOnlyFrom?: {
                                                                                      [key: string]: boolean;
                                                                                      };
                                                                                      coverageDirectory: string;
                                                                                      coveragePathIgnorePatterns?: Array<string>;
                                                                                      coverageProvider: CoverageProvider;
                                                                                      coverageReporters: CoverageReporters;
                                                                                      coverageThreshold?: CoverageThreshold;
                                                                                      detectLeaks: boolean;
                                                                                      detectOpenHandles: boolean;
                                                                                      expand: boolean;
                                                                                      filter?: Path;
                                                                                      findRelatedTests: boolean;
                                                                                      forceExit: boolean;
                                                                                      json: boolean;
                                                                                      globalSetup?: string;
                                                                                      globalTeardown?: string;
                                                                                      lastCommit: boolean;
                                                                                      logHeapUsage: boolean;
                                                                                      listTests: boolean;
                                                                                      maxConcurrency: number;
                                                                                      maxWorkers: number;
                                                                                      noStackTrace: boolean;
                                                                                      nonFlagArgs: Array<string>;
                                                                                      noSCM?: boolean;
                                                                                      notify: boolean;
                                                                                      notifyMode: NotifyMode;
                                                                                      outputFile?: Path;
                                                                                      onlyChanged: boolean;
                                                                                      onlyFailures: boolean;
                                                                                      passWithNoTests: boolean;
                                                                                      projects: Array<Glob>;
                                                                                      replname?: string;
                                                                                      reporters?: Array<string | ReporterConfig>;
                                                                                      runTestsByPath: boolean;
                                                                                      rootDir: Path;
                                                                                      silent?: boolean;
                                                                                      skipFilter: boolean;
                                                                                      snapshotFormat: PrettyFormatOptions;
                                                                                      errorOnDeprecated: boolean;
                                                                                      testFailureExitCode: number;
                                                                                      testNamePattern?: string;
                                                                                      testPathPattern: string;
                                                                                      testResultsProcessor?: string;
                                                                                      testSequencer: string;
                                                                                      testTimeout?: number;
                                                                                      updateSnapshot: SnapshotUpdateState;
                                                                                      useStderr: boolean;
                                                                                      verbose?: boolean;
                                                                                      watch: boolean;
                                                                                      watchAll: boolean;
                                                                                      watchman: boolean;
                                                                                      watchPlugins?: Array<{
                                                                                      path: string;
                                                                                      config: Record<string, unknown>;
                                                                                      }> | null;
                                                                                      };

                                                                                        type HasteConfig

                                                                                        type HasteConfig = {
                                                                                        /** Whether to hash files using SHA-1. */
                                                                                        computeSha1?: boolean;
                                                                                        /** The platform to use as the default, e.g. 'ios'. */
                                                                                        defaultPlatform?: string | null;
                                                                                        /** Force use of Node's `fs` APIs rather than shelling out to `find` */
                                                                                        forceNodeFilesystemAPI?: boolean;
                                                                                        /**
                                                                                        * Whether to follow symlinks when crawling for files.
                                                                                        * This options cannot be used in projects which use watchman.
                                                                                        * Projects with `watchman` set to true will error if this option is set to true.
                                                                                        */
                                                                                        enableSymlinks?: boolean;
                                                                                        /** Path to a custom implementation of Haste. */
                                                                                        hasteImplModulePath?: string;
                                                                                        /** All platforms to target, e.g ['ios', 'android']. */
                                                                                        platforms?: Array<string>;
                                                                                        /** Whether to throw on error on module collision. */
                                                                                        throwOnModuleCollision?: boolean;
                                                                                        /** Custom HasteMap module */
                                                                                        hasteMapModulePath?: string;
                                                                                        };

                                                                                          type InitialOptions

                                                                                          type InitialOptions = Partial<{
                                                                                          automock: boolean;
                                                                                          bail: boolean | number;
                                                                                          cache: boolean;
                                                                                          cacheDirectory: Path;
                                                                                          ci: boolean;
                                                                                          clearMocks: boolean;
                                                                                          changedFilesWithAncestor: boolean;
                                                                                          changedSince: string;
                                                                                          collectCoverage: boolean;
                                                                                          collectCoverageFrom: Array<Glob>;
                                                                                          collectCoverageOnlyFrom: {
                                                                                          [key: string]: boolean;
                                                                                          };
                                                                                          coverageDirectory: string;
                                                                                          coveragePathIgnorePatterns: Array<string>;
                                                                                          coverageProvider: CoverageProvider;
                                                                                          coverageReporters: CoverageReporters;
                                                                                          coverageThreshold: CoverageThreshold;
                                                                                          dependencyExtractor: string;
                                                                                          detectLeaks: boolean;
                                                                                          detectOpenHandles: boolean;
                                                                                          displayName: string | DisplayName;
                                                                                          expand: boolean;
                                                                                          extensionsToTreatAsEsm: Array<Path>;
                                                                                          extraGlobals: Array<string>;
                                                                                          filter: Path;
                                                                                          findRelatedTests: boolean;
                                                                                          forceCoverageMatch: Array<Glob>;
                                                                                          forceExit: boolean;
                                                                                          json: boolean;
                                                                                          globals: ConfigGlobals;
                                                                                          globalSetup: string | null | undefined;
                                                                                          globalTeardown: string | null | undefined;
                                                                                          haste: HasteConfig;
                                                                                          injectGlobals: boolean;
                                                                                          reporters: Array<string | ReporterConfig>;
                                                                                          logHeapUsage: boolean;
                                                                                          lastCommit: boolean;
                                                                                          listTests: boolean;
                                                                                          maxConcurrency: number;
                                                                                          maxWorkers: number | string;
                                                                                          moduleDirectories: Array<string>;
                                                                                          moduleFileExtensions: Array<string>;
                                                                                          moduleLoader: Path;
                                                                                          moduleNameMapper: {
                                                                                          [key: string]: string | Array<string>;
                                                                                          };
                                                                                          modulePathIgnorePatterns: Array<string>;
                                                                                          modulePaths: Array<string>;
                                                                                          name: string;
                                                                                          noStackTrace: boolean;
                                                                                          notify: boolean;
                                                                                          notifyMode: string;
                                                                                          onlyChanged: boolean;
                                                                                          onlyFailures: boolean;
                                                                                          outputFile: Path;
                                                                                          passWithNoTests: boolean;
                                                                                          /**
                                                                                          * @deprecated Use `transformIgnorePatterns` options instead.
                                                                                          */
                                                                                          preprocessorIgnorePatterns: Array<Glob>;
                                                                                          preset: string | null | undefined;
                                                                                          prettierPath: string | null | undefined;
                                                                                          projects: Array<Glob | InitialProjectOptions>;
                                                                                          replname: string | null | undefined;
                                                                                          resetMocks: boolean;
                                                                                          resetModules: boolean;
                                                                                          resolver: Path | null | undefined;
                                                                                          restoreMocks: boolean;
                                                                                          rootDir: Path;
                                                                                          roots: Array<Path>;
                                                                                          runner: string;
                                                                                          runTestsByPath: boolean;
                                                                                          /**
                                                                                          * @deprecated Use `transform` options instead.
                                                                                          */
                                                                                          scriptPreprocessor: string;
                                                                                          setupFiles: Array<Path>;
                                                                                          /**
                                                                                          * @deprecated Use `setupFilesAfterEnv` options instead.
                                                                                          */
                                                                                          setupTestFrameworkScriptFile: Path;
                                                                                          setupFilesAfterEnv: Array<Path>;
                                                                                          silent: boolean;
                                                                                          skipFilter: boolean;
                                                                                          skipNodeResolution: boolean;
                                                                                          slowTestThreshold: number;
                                                                                          snapshotResolver: Path;
                                                                                          snapshotSerializers: Array<Path>;
                                                                                          snapshotFormat: PrettyFormatOptions;
                                                                                          errorOnDeprecated: boolean;
                                                                                          testEnvironment: string;
                                                                                          testEnvironmentOptions: Record<string, unknown>;
                                                                                          testFailureExitCode: string | number;
                                                                                          testLocationInResults: boolean;
                                                                                          testMatch: Array<Glob>;
                                                                                          testNamePattern: string;
                                                                                          /**
                                                                                          * @deprecated Use `roots` options instead.
                                                                                          */
                                                                                          testPathDirs: Array<Path>;
                                                                                          testPathIgnorePatterns: Array<string>;
                                                                                          testRegex: string | Array<string>;
                                                                                          testResultsProcessor: string;
                                                                                          testRunner: string;
                                                                                          testSequencer: string;
                                                                                          testURL: string;
                                                                                          testTimeout: number;
                                                                                          timers: Timers;
                                                                                          transform: {
                                                                                          [regex: string]: Path | TransformerConfig;
                                                                                          };
                                                                                          transformIgnorePatterns: Array<Glob>;
                                                                                          watchPathIgnorePatterns: Array<string>;
                                                                                          unmockedModulePathPatterns: Array<string>;
                                                                                          updateSnapshot: boolean;
                                                                                          useStderr: boolean;
                                                                                          verbose?: boolean;
                                                                                          watch: boolean;
                                                                                          watchAll: boolean;
                                                                                          watchman: boolean;
                                                                                          watchPlugins: Array<string | [string, Record<string, unknown>]>;
                                                                                          }>;

                                                                                            type InitialOptionsWithRootDir

                                                                                            type InitialOptionsWithRootDir = InitialOptions &
                                                                                            Required<Pick<InitialOptions, 'rootDir'>>;

                                                                                              type InitialProjectOptions

                                                                                              type InitialProjectOptions = Pick<
                                                                                              InitialOptions & {
                                                                                              cwd?: string;
                                                                                              },
                                                                                              keyof ProjectConfig
                                                                                              >;

                                                                                                type Path

                                                                                                type Path = string;

                                                                                                  type ProjectConfig

                                                                                                  type ProjectConfig = {
                                                                                                  automock: boolean;
                                                                                                  cache: boolean;
                                                                                                  cacheDirectory: Path;
                                                                                                  clearMocks: boolean;
                                                                                                  coveragePathIgnorePatterns: Array<string>;
                                                                                                  cwd: Path;
                                                                                                  dependencyExtractor?: string;
                                                                                                  detectLeaks: boolean;
                                                                                                  detectOpenHandles: boolean;
                                                                                                  displayName?: DisplayName;
                                                                                                  errorOnDeprecated: boolean;
                                                                                                  extensionsToTreatAsEsm: Array<Path>;
                                                                                                  extraGlobals: Array<keyof typeof globalThis>;
                                                                                                  filter?: Path;
                                                                                                  forceCoverageMatch: Array<Glob>;
                                                                                                  globalSetup?: string;
                                                                                                  globalTeardown?: string;
                                                                                                  globals: ConfigGlobals;
                                                                                                  haste: HasteConfig;
                                                                                                  injectGlobals: boolean;
                                                                                                  moduleDirectories: Array<string>;
                                                                                                  moduleFileExtensions: Array<string>;
                                                                                                  moduleLoader?: Path;
                                                                                                  moduleNameMapper: Array<[string, string]>;
                                                                                                  modulePathIgnorePatterns: Array<string>;
                                                                                                  modulePaths?: Array<string>;
                                                                                                  name: string;
                                                                                                  prettierPath: string;
                                                                                                  resetMocks: boolean;
                                                                                                  resetModules: boolean;
                                                                                                  resolver?: Path;
                                                                                                  restoreMocks: boolean;
                                                                                                  rootDir: Path;
                                                                                                  roots: Array<Path>;
                                                                                                  runner: string;
                                                                                                  setupFiles: Array<Path>;
                                                                                                  setupFilesAfterEnv: Array<Path>;
                                                                                                  skipFilter: boolean;
                                                                                                  skipNodeResolution?: boolean;
                                                                                                  slowTestThreshold: number;
                                                                                                  snapshotResolver?: Path;
                                                                                                  snapshotSerializers: Array<Path>;
                                                                                                  snapshotFormat: PrettyFormatOptions;
                                                                                                  testEnvironment: string;
                                                                                                  testEnvironmentOptions: Record<string, unknown>;
                                                                                                  testMatch: Array<Glob>;
                                                                                                  testLocationInResults: boolean;
                                                                                                  testPathIgnorePatterns: Array<string>;
                                                                                                  testRegex: Array<string | RegExp>;
                                                                                                  testRunner: string;
                                                                                                  testURL: string;
                                                                                                  timers: Timers;
                                                                                                  transform: Array<[string, Path, Record<string, unknown>]>;
                                                                                                  transformIgnorePatterns: Array<Glob>;
                                                                                                  watchPathIgnorePatterns: Array<string>;
                                                                                                  unmockedModulePathPatterns?: Array<string>;
                                                                                                  };

                                                                                                    type ReporterConfig

                                                                                                    type ReporterConfig = [string, Record<string, unknown>];

                                                                                                      type SnapshotUpdateState

                                                                                                      type SnapshotUpdateState = 'all' | 'new' | 'none';

                                                                                                        type TransformerConfig

                                                                                                        type TransformerConfig = [string, Record<string, unknown>];

                                                                                                          namespace Global

                                                                                                          module 'build/Global.d.ts' {}
                                                                                                          • Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

                                                                                                            This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

                                                                                                          interface Describe

                                                                                                          interface Describe extends DescribeBase {}

                                                                                                            property only

                                                                                                            only: DescribeBase;

                                                                                                              property skip

                                                                                                              skip: DescribeBase;

                                                                                                                interface DescribeBase

                                                                                                                interface DescribeBase {}

                                                                                                                  property each

                                                                                                                  each: Each<BlockFn>;

                                                                                                                    call signature

                                                                                                                    (blockName: BlockName, blockFn: BlockFn): void;

                                                                                                                      interface Global

                                                                                                                      interface Global
                                                                                                                      extends GlobalAdditions,
                                                                                                                      Omit<typeof globalThis, keyof GlobalAdditions> {}

                                                                                                                        index signature

                                                                                                                        [extras: string]: unknown;

                                                                                                                          interface GlobalAdditions

                                                                                                                          interface GlobalAdditions extends TestFrameworkGlobals {}

                                                                                                                            property fail

                                                                                                                            fail: () => void;

                                                                                                                              property jasmine

                                                                                                                              jasmine: Jasmine;

                                                                                                                                property pending

                                                                                                                                pending: () => void;

                                                                                                                                  property spyOn

                                                                                                                                  spyOn: () => void;

                                                                                                                                    property spyOnProperty

                                                                                                                                    spyOnProperty: () => void;

                                                                                                                                      interface HookBase

                                                                                                                                      interface HookBase {}

                                                                                                                                        call signature

                                                                                                                                        (fn: HookFn, timeout?: number): void;

                                                                                                                                          interface It

                                                                                                                                          interface It extends ItBase {}

                                                                                                                                            property only

                                                                                                                                            only: ItBase;

                                                                                                                                              property skip

                                                                                                                                              skip: ItBase;

                                                                                                                                                property todo

                                                                                                                                                todo: (testName: TestName) => void;

                                                                                                                                                  interface ItBase

                                                                                                                                                  interface ItBase {}

                                                                                                                                                    property each

                                                                                                                                                    each: Each<TestFn>;

                                                                                                                                                      call signature

                                                                                                                                                      (testName: TestName, fn: TestFn, timeout?: number): void;

                                                                                                                                                        interface ItConcurrent

                                                                                                                                                        interface ItConcurrent extends It {}

                                                                                                                                                          property concurrent

                                                                                                                                                          concurrent: ItConcurrentExtended;

                                                                                                                                                            interface ItConcurrentBase

                                                                                                                                                            interface ItConcurrentBase {}

                                                                                                                                                              property each

                                                                                                                                                              each: Each<ConcurrentTestFn>;

                                                                                                                                                                call signature

                                                                                                                                                                (testName: string, testFn: ConcurrentTestFn, timeout?: number): void;

                                                                                                                                                                  interface ItConcurrentExtended

                                                                                                                                                                  interface ItConcurrentExtended extends ItConcurrentBase {}

                                                                                                                                                                    property only

                                                                                                                                                                    only: ItConcurrentBase;

                                                                                                                                                                      property skip

                                                                                                                                                                      skip: ItConcurrentBase;

                                                                                                                                                                        interface TestFrameworkGlobals

                                                                                                                                                                        interface TestFrameworkGlobals {}

                                                                                                                                                                          property afterAll

                                                                                                                                                                          afterAll: HookBase;

                                                                                                                                                                            property afterEach

                                                                                                                                                                            afterEach: HookBase;

                                                                                                                                                                              property beforeAll

                                                                                                                                                                              beforeAll: HookBase;

                                                                                                                                                                                property beforeEach

                                                                                                                                                                                beforeEach: HookBase;

                                                                                                                                                                                  property describe

                                                                                                                                                                                  describe: Describe;

                                                                                                                                                                                    property fdescribe

                                                                                                                                                                                    fdescribe: DescribeBase;

                                                                                                                                                                                      property fit

                                                                                                                                                                                      fit: ItBase & {
                                                                                                                                                                                      concurrent?: ItConcurrentBase;
                                                                                                                                                                                      };

                                                                                                                                                                                        property it

                                                                                                                                                                                        it: ItConcurrent;

                                                                                                                                                                                          property test

                                                                                                                                                                                          test: ItConcurrent;

                                                                                                                                                                                            property xdescribe

                                                                                                                                                                                            xdescribe: DescribeBase;

                                                                                                                                                                                              property xit

                                                                                                                                                                                              xit: ItBase;

                                                                                                                                                                                                property xtest

                                                                                                                                                                                                xtest: ItBase;

                                                                                                                                                                                                  type ArrayTable

                                                                                                                                                                                                  type ArrayTable = Table | Row;

                                                                                                                                                                                                    type BlockFn

                                                                                                                                                                                                    type BlockFn = () => void;

                                                                                                                                                                                                      type BlockName

                                                                                                                                                                                                      type BlockName = string;

                                                                                                                                                                                                        type Col

                                                                                                                                                                                                        type Col = unknown;

                                                                                                                                                                                                          type ConcurrentTestFn

                                                                                                                                                                                                          type ConcurrentTestFn = () => TestReturnValuePromise;

                                                                                                                                                                                                            type DoneFn

                                                                                                                                                                                                            type DoneFn = (reason?: string | Error) => void;

                                                                                                                                                                                                              type DoneTakingTestFn

                                                                                                                                                                                                              type DoneTakingTestFn = (
                                                                                                                                                                                                              this: TestContext | undefined,
                                                                                                                                                                                                              done: DoneFn
                                                                                                                                                                                                              ) => ValidTestReturnValues;

                                                                                                                                                                                                                type EachTable

                                                                                                                                                                                                                type EachTable = ArrayTable | TemplateTable;

                                                                                                                                                                                                                  type EachTestFn

                                                                                                                                                                                                                  type EachTestFn<EachCallback extends TestCallback> = (
                                                                                                                                                                                                                  ...args: Array<any>
                                                                                                                                                                                                                  ) => ReturnType<EachCallback>;

                                                                                                                                                                                                                    type GeneratorReturningTestFn

                                                                                                                                                                                                                    type GeneratorReturningTestFn = (
                                                                                                                                                                                                                    this: TestContext | undefined
                                                                                                                                                                                                                    ) => TestReturnValueGenerator;

                                                                                                                                                                                                                      type HookFn

                                                                                                                                                                                                                      type HookFn = TestFn;

                                                                                                                                                                                                                        type PromiseReturningTestFn

                                                                                                                                                                                                                        type PromiseReturningTestFn = (this: TestContext | undefined) => TestReturnValue;

                                                                                                                                                                                                                          type Row

                                                                                                                                                                                                                          type Row = Array<Col>;

                                                                                                                                                                                                                            type Table

                                                                                                                                                                                                                            type Table = Array<Row>;

                                                                                                                                                                                                                              type TemplateData

                                                                                                                                                                                                                              type TemplateData = Array<unknown>;

                                                                                                                                                                                                                                type TemplateTable

                                                                                                                                                                                                                                type TemplateTable = TemplateStringsArray;

                                                                                                                                                                                                                                  type TestCallback

                                                                                                                                                                                                                                  type TestCallback = BlockFn | TestFn | ConcurrentTestFn;

                                                                                                                                                                                                                                    type TestContext

                                                                                                                                                                                                                                    type TestContext = Record<string, unknown>;

                                                                                                                                                                                                                                      type TestFn

                                                                                                                                                                                                                                      type TestFn = PromiseReturningTestFn | GeneratorReturningTestFn | DoneTakingTestFn;

                                                                                                                                                                                                                                        type TestName

                                                                                                                                                                                                                                        type TestName = string;

                                                                                                                                                                                                                                          type TestReturnValue

                                                                                                                                                                                                                                          type TestReturnValue = ValidTestReturnValues | TestReturnValuePromise;

                                                                                                                                                                                                                                            type ValidTestReturnValues

                                                                                                                                                                                                                                            type ValidTestReturnValues = void | undefined;

                                                                                                                                                                                                                                              namespace TestResult

                                                                                                                                                                                                                                              module 'build/TestResult.d.ts' {}
                                                                                                                                                                                                                                              • Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

                                                                                                                                                                                                                                                This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

                                                                                                                                                                                                                                              type AssertionResult

                                                                                                                                                                                                                                              type AssertionResult = {
                                                                                                                                                                                                                                              ancestorTitles: Array<string>;
                                                                                                                                                                                                                                              duration?: Milliseconds | null;
                                                                                                                                                                                                                                              failureDetails: Array<unknown>;
                                                                                                                                                                                                                                              failureMessages: Array<string>;
                                                                                                                                                                                                                                              fullName: string;
                                                                                                                                                                                                                                              invocations?: number;
                                                                                                                                                                                                                                              location?: Callsite | null;
                                                                                                                                                                                                                                              numPassingAsserts: number;
                                                                                                                                                                                                                                              status: Status;
                                                                                                                                                                                                                                              title: string;
                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                type Milliseconds

                                                                                                                                                                                                                                                type Milliseconds = number;
                                                                                                                                                                                                                                                • Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

                                                                                                                                                                                                                                                  This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

                                                                                                                                                                                                                                                type SerializableError

                                                                                                                                                                                                                                                type SerializableError = {
                                                                                                                                                                                                                                                code?: unknown;
                                                                                                                                                                                                                                                message: string;
                                                                                                                                                                                                                                                stack: string | null | undefined;
                                                                                                                                                                                                                                                type?: string;
                                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                                  namespace TransformTypes

                                                                                                                                                                                                                                                  module 'build/Transform.d.ts' {}
                                                                                                                                                                                                                                                  • Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

                                                                                                                                                                                                                                                    This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

                                                                                                                                                                                                                                                  type TransformResult

                                                                                                                                                                                                                                                  type TransformResult = {
                                                                                                                                                                                                                                                  code: string;
                                                                                                                                                                                                                                                  originalCode: string;
                                                                                                                                                                                                                                                  sourceMapPath: string | null;
                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                  • Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

                                                                                                                                                                                                                                                    This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

                                                                                                                                                                                                                                                  Package Files (6)

                                                                                                                                                                                                                                                  Dependencies (5)

                                                                                                                                                                                                                                                  Dev Dependencies (1)

                                                                                                                                                                                                                                                  Peer Dependencies (0)

                                                                                                                                                                                                                                                  No peer dependencies.

                                                                                                                                                                                                                                                  Badge

                                                                                                                                                                                                                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@jest/types.

                                                                                                                                                                                                                                                  • Markdown
                                                                                                                                                                                                                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@jest/types)
                                                                                                                                                                                                                                                  • HTML
                                                                                                                                                                                                                                                    <a href="https://www.jsdocs.io/package/@jest/types"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>