jest-runtime
- Version 29.7.0
- Published
- 89.2 kB
- 22 dependencies
- MIT license
Install
npm i jest-runtime
yarn add jest-runtime
pnpm add jest-runtime
Overview
Overview not available.
Index
Classes
Runtime
- clearAllMocks()
- collectV8Coverage()
- createContext()
- createHasteMap()
- createResolver()
- getAllCoverageInfoCopy()
- getAllV8CoverageInfoCopy()
- getCLIOptions()
- getSourceMaps()
- isolateModules()
- isolateModulesAsync()
- requireActual()
- requireInternalModule()
- requireMock()
- requireModule()
- requireModuleOrMock()
- resetAllMocks()
- resetModules()
- restoreAllMocks()
- runCLI()
- setGlobalsForRuntime()
- setMock()
- shouldInstrument
- stopCollectingV8Coverage()
- teardown()
- unstable_importModule()
- unstable_shouldLoadAsEsm()
Classes
class Runtime
class Runtime {}
constructor
constructor( config: Config.ProjectConfig, environment: JestEnvironment, resolver: Resolver, transformer: ScriptTransformer, cacheFS: Map<string, string>, coverageOptions: ShouldInstrumentOptions, testPath: string, globalConfig?: Config.GlobalConfig);
property shouldInstrument
static shouldInstrument: any;
method clearAllMocks
clearAllMocks: () => void;
method collectV8Coverage
collectV8Coverage: () => Promise<void>;
method createContext
static createContext: ( config: Config.ProjectConfig, options: { console?: Console; maxWorkers: number; watch?: boolean; watchman: boolean; }) => Promise<TestContext>;
method createHasteMap
static createHasteMap: ( config: Config.ProjectConfig, options?: HasteMapOptions) => Promise<IHasteMap>;
method createResolver
static createResolver: ( config: Config.ProjectConfig, moduleMap: IModuleMap) => Resolver;
method getAllCoverageInfoCopy
getAllCoverageInfoCopy: () => JestEnvironment;
method getAllV8CoverageInfoCopy
getAllV8CoverageInfoCopy: () => V8CoverageResult;
method getCLIOptions
static getCLIOptions: () => never;
method getSourceMaps
getSourceMaps: () => SourceMapRegistry;
method isolateModules
isolateModules: (fn: () => void) => void;
method isolateModulesAsync
isolateModulesAsync: (fn: () => Promise<void>) => Promise<void>;
method requireActual
requireActual: <T = unknown>(from: string, moduleName: string) => T;
method requireInternalModule
requireInternalModule: <T = unknown>(from: string, to?: string) => T;
method requireMock
requireMock: <T = unknown>(from: string, moduleName: string) => T;
method requireModule
requireModule: <T = unknown>( from: string, moduleName?: string, options?: InternalModuleOptions, isRequireActual?: boolean) => T;
method requireModuleOrMock
requireModuleOrMock: <T = unknown>(from: string, 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: string, moduleName?: string) => Promise<unknown | void>;
method unstable_shouldLoadAsEsm
unstable_shouldLoadAsEsm: (modulePath: string) => boolean;
Package Files (1)
Dependencies (22)
Dev Dependencies (4)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto 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>
- Updated .
Package analyzed in 2545 ms. - Missing or incorrect documentation? Open an issue for this package.