This commit is contained in:
22
node_modules/jest-runtime/LICENSE
generated
vendored
Normal file
22
node_modules/jest-runtime/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
Copyright Contributors to the Jest project.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
133
node_modules/jest-runtime/build/index.d.ts
generated
vendored
Normal file
133
node_modules/jest-runtime/build/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import {JestEnvironment} from '@jest/environment';
|
||||
import {expect} from '@jest/globals';
|
||||
import {SourceMapRegistry} from '@jest/source-map';
|
||||
import {TestContext, V8CoverageResult} from '@jest/test-result';
|
||||
import {
|
||||
CallerTransformOptions,
|
||||
ScriptTransformer,
|
||||
ShouldInstrumentOptions,
|
||||
shouldInstrument,
|
||||
} from '@jest/transform';
|
||||
import {Config, Global as Global_2} from '@jest/types';
|
||||
import {IHasteMap, IModuleMap} from 'jest-haste-map';
|
||||
import Resolver from 'jest-resolve';
|
||||
|
||||
declare interface EnvironmentGlobals extends Global_2.TestFrameworkGlobals {
|
||||
expect: typeof expect;
|
||||
}
|
||||
|
||||
declare type HasteMapOptions = {
|
||||
console?: Console;
|
||||
maxWorkers: number;
|
||||
resetCache: boolean;
|
||||
watch?: boolean;
|
||||
watchman: boolean;
|
||||
workerThreads?: boolean;
|
||||
};
|
||||
|
||||
declare class Runtime {
|
||||
private readonly fileCache;
|
||||
private readonly _config;
|
||||
private readonly _coverageOptions;
|
||||
private readonly _environment;
|
||||
private readonly mockState;
|
||||
private readonly registries;
|
||||
private readonly testMainModule;
|
||||
private readonly requireBuilder;
|
||||
private readonly executor;
|
||||
private readonly esmLoader;
|
||||
private readonly cjsLoader;
|
||||
private readonly _moduleMocker;
|
||||
private readonly cjsExportsCache;
|
||||
private readonly _testPath;
|
||||
private readonly _resolution;
|
||||
private readonly transformCache;
|
||||
private readonly v8Coverage;
|
||||
private readonly coreModule;
|
||||
private readonly jestGlobals;
|
||||
private readonly testState;
|
||||
private readonly loggedReferenceErrors;
|
||||
constructor(
|
||||
config: Config.ProjectConfig,
|
||||
environment: JestEnvironment,
|
||||
resolver: Resolver,
|
||||
transformer: ScriptTransformer,
|
||||
cacheFS: Map<string, string>,
|
||||
coverageOptions: ShouldInstrumentOptions,
|
||||
testPath: string,
|
||||
globalConfig: Config.GlobalConfig,
|
||||
);
|
||||
static shouldInstrument: typeof shouldInstrument;
|
||||
static createContext(
|
||||
config: Config.ProjectConfig,
|
||||
options: {
|
||||
console?: Console;
|
||||
maxWorkers: number;
|
||||
watch?: boolean;
|
||||
watchman: boolean;
|
||||
},
|
||||
): Promise<TestContext>;
|
||||
static createHasteMap(
|
||||
config: Config.ProjectConfig,
|
||||
options?: HasteMapOptions,
|
||||
): Promise<IHasteMap>;
|
||||
static createResolver(
|
||||
config: Config.ProjectConfig,
|
||||
moduleMap: IModuleMap,
|
||||
): Resolver;
|
||||
unstable_shouldLoadAsEsm(modulePath: string): boolean;
|
||||
unstable_importModule(
|
||||
from: string,
|
||||
moduleName?: string,
|
||||
): Promise<unknown | void>;
|
||||
requireModule<T = unknown>(
|
||||
from: string,
|
||||
moduleName?: string,
|
||||
options?: TransformOptions,
|
||||
isRequireActual?: boolean,
|
||||
): T;
|
||||
requireInternalModule<T = unknown>(from: string, to?: string): T;
|
||||
requireActual<T = unknown>(from: string, moduleName: string): T;
|
||||
requireMock<T = unknown>(from: string, moduleName: string): T;
|
||||
private _requireMockWithId;
|
||||
private _getFullTransformationOptions;
|
||||
requireModuleOrMock<T = unknown>(from: string, moduleName: string): T;
|
||||
isolateModules(fn: () => void): void;
|
||||
isolateModulesAsync(fn: () => Promise<void>): Promise<void>;
|
||||
resetModules(): void;
|
||||
collectV8Coverage(): Promise<void>;
|
||||
stopCollectingV8Coverage(): Promise<void>;
|
||||
getAllCoverageInfoCopy(): JestEnvironment['global']['__coverage__'];
|
||||
getAllV8CoverageInfoCopy(): V8CoverageResult;
|
||||
getSourceMaps(): SourceMapRegistry;
|
||||
setMock(
|
||||
from: string,
|
||||
moduleName: string,
|
||||
mockFactory: () => unknown,
|
||||
options?: {
|
||||
virtual?: boolean;
|
||||
},
|
||||
): void;
|
||||
private setModuleMock;
|
||||
restoreAllMocks(): void;
|
||||
resetAllMocks(): void;
|
||||
clearAllMocks(): void;
|
||||
enterTestCode(): void;
|
||||
leaveTestCode(): void;
|
||||
teardown(): void;
|
||||
private _generateMock;
|
||||
private _logFormattedReferenceError;
|
||||
setGlobalsForRuntime(globals: EnvironmentGlobals): void;
|
||||
}
|
||||
export default Runtime;
|
||||
|
||||
declare interface TransformOptions extends Required<CallerTransformOptions> {
|
||||
isInternalModule: boolean;
|
||||
}
|
||||
3877
node_modules/jest-runtime/build/index.js
generated
vendored
Normal file
3877
node_modules/jest-runtime/build/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
node_modules/jest-runtime/build/index.mjs
generated
vendored
Normal file
3
node_modules/jest-runtime/build/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import cjsModule from './index.js';
|
||||
|
||||
export default cjsModule.default;
|
||||
57
node_modules/jest-runtime/package.json
generated
vendored
Normal file
57
node_modules/jest-runtime/package.json
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "jest-runtime",
|
||||
"version": "30.4.2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jestjs/jest.git",
|
||||
"directory": "packages/jest-runtime"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "./build/index.js",
|
||||
"types": "./build/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./build/index.d.ts",
|
||||
"require": "./build/index.js",
|
||||
"import": "./build/index.mjs",
|
||||
"default": "./build/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jest/environment": "30.4.1",
|
||||
"@jest/fake-timers": "30.4.1",
|
||||
"@jest/globals": "30.4.1",
|
||||
"@jest/source-map": "30.0.1",
|
||||
"@jest/test-result": "30.4.1",
|
||||
"@jest/transform": "30.4.1",
|
||||
"@jest/types": "30.4.1",
|
||||
"@types/node": "*",
|
||||
"chalk": "^4.1.2",
|
||||
"cjs-module-lexer": "^2.1.0",
|
||||
"collect-v8-coverage": "^1.0.2",
|
||||
"glob": "^10.5.0",
|
||||
"graceful-fs": "^4.2.11",
|
||||
"jest-haste-map": "30.4.1",
|
||||
"jest-message-util": "30.4.1",
|
||||
"jest-mock": "30.4.1",
|
||||
"jest-regex-util": "30.4.0",
|
||||
"jest-resolve": "30.4.1",
|
||||
"jest-snapshot": "30.4.1",
|
||||
"jest-util": "30.4.1",
|
||||
"slash": "^3.0.0",
|
||||
"strip-bom": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/test-utils": "30.4.1",
|
||||
"@types/graceful-fs": "^4.1.9",
|
||||
"jest-environment-node": "30.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "746f2a0f57c56e3bba555280f0587d40f3db95c0"
|
||||
}
|
||||
Reference in New Issue
Block a user