jest-runtime

  • Version 27.2.5
  • Published
  • 81.3 kB
  • 27 dependencies
  • MIT license

Install

npm i jest-runtime
yarn add jest-runtime
pnpm add jest-runtime

Overview

Overview not available.

Index

Classes

class Runtime

class Runtime {}

    constructor

    constructor(
    config: any,
    environment: any,
    resolver: any,
    transformer: any,
    cacheFS: Map<string, string>,
    coverageOptions: any,
    testPath: any
    );

      property shouldInstrument

      static shouldInstrument: any;

        method clearAllMocks

        clearAllMocks: () => void;

          method collectV8Coverage

          collectV8Coverage: () => Promise<void>;

            method createContext

            static createContext: (
            config: any,
            options: {
            console?: Console;
            maxWorkers: number;
            watch?: boolean;
            watchman: boolean;
            }
            ) => Promise<Context>;

              method createHasteMap

              static createHasteMap: (config: any, options?: HasteMapOptions) => any;

                method createResolver

                static createResolver: (config: any, moduleMap: any) => any;

                  method getAllCoverageInfoCopy

                  getAllCoverageInfoCopy: () => any;

                    method getAllV8CoverageInfoCopy

                    getAllV8CoverageInfoCopy: () => any;

                      method getCLIOptions

                      static getCLIOptions: () => never;

                        method getSourceMaps

                        getSourceMaps: () => any;

                          method isolateModules

                          isolateModules: (fn: () => void) => void;

                            method requireActual

                            requireActual: <T = unknown>(from: any, moduleName: string) => T;

                              method requireInternalModule

                              requireInternalModule: <T = unknown>(from: any, to?: string) => T;

                                method requireMock

                                requireMock: <T = unknown>(from: any, moduleName: string) => T;

                                  method requireModule

                                  requireModule: <T = unknown>(
                                  from: any,
                                  moduleName?: string,
                                  options?: InternalModuleOptions,
                                  isRequireActual?: boolean
                                  ) => T;

                                    method requireModuleOrMock

                                    requireModuleOrMock: <T = unknown>(from: any, moduleName: string) => T;

                                      method resetAllMocks

                                      resetAllMocks: () => void;

                                        method resetModules

                                        resetModules: () => void;

                                          method restoreAllMocks

                                          restoreAllMocks: () => void;

                                            method runCLI

                                            static runCLI: () => Promise<never>;

                                              method setGlobalsForRuntime

                                              setGlobalsForRuntime: (globals: JestGlobals) => void;

                                                method setMock

                                                setMock: (
                                                from: string,
                                                moduleName: string,
                                                mockFactory: () => unknown,
                                                options?: { virtual?: boolean }
                                                ) => void;

                                                  method stopCollectingV8Coverage

                                                  stopCollectingV8Coverage: () => Promise<void>;

                                                    method teardown

                                                    teardown: () => void;

                                                      method unstable_importModule

                                                      unstable_importModule: (from: any, moduleName?: string) => Promise<void>;

                                                        method unstable_shouldLoadAsEsm

                                                        unstable_shouldLoadAsEsm: (path: any) => boolean;

                                                          Type Aliases

                                                          type Context

                                                          type Context = {
                                                          config: Config.ProjectConfig;
                                                          hasteFS: HasteFS;
                                                          moduleMap: ModuleMap;
                                                          resolver: Resolver;
                                                          };

                                                            Package Files (2)

                                                            Dependencies (27)

                                                            Dev Dependencies (7)

                                                            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-runtime.

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