Add node modules and compiled JavaScript from main (#57)
Co-authored-by: Oliver King <oking3@uncc.edu>
This commit is contained in:
parent
d893f27da9
commit
7f7e5ba5ea
6750 changed files with 1745644 additions and 10860 deletions
21
node_modules/jest-runtime/LICENSE
generated
vendored
Normal file
21
node_modules/jest-runtime/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Facebook, Inc. and its affiliates.
|
||||
|
||||
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.
|
9
node_modules/jest-runtime/build/cli/args.d.ts
generated
vendored
Normal file
9
node_modules/jest-runtime/build/cli/args.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
import type { Options } from 'yargs';
|
||||
export declare const usage = "Usage: $0 [--config=<pathToConfigFile>] <file>";
|
||||
export declare const options: Record<'cache' | 'config' | 'debug' | 'version' | 'watchman', Options>;
|
46
node_modules/jest-runtime/build/cli/args.js
generated
vendored
Normal file
46
node_modules/jest-runtime/build/cli/args.js
generated
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.options = exports.usage = void 0;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
const usage = 'Usage: $0 [--config=<pathToConfigFile>] <file>';
|
||||
exports.usage = usage;
|
||||
const options = {
|
||||
cache: {
|
||||
default: true,
|
||||
description:
|
||||
'Whether to use the preprocessor cache. Disable ' +
|
||||
'the cache using --no-cache.',
|
||||
type: 'boolean'
|
||||
},
|
||||
config: {
|
||||
alias: 'c',
|
||||
description: 'The path to a Jest config file.',
|
||||
type: 'string'
|
||||
},
|
||||
debug: {
|
||||
description: 'Print debugging info about your jest config.',
|
||||
type: 'boolean'
|
||||
},
|
||||
version: {
|
||||
alias: 'v',
|
||||
description: 'Print the version and exit',
|
||||
type: 'boolean'
|
||||
},
|
||||
watchman: {
|
||||
default: true,
|
||||
description:
|
||||
'Whether to use watchman for file crawling. Disable using ' +
|
||||
'--no-watchman.',
|
||||
type: 'boolean'
|
||||
}
|
||||
};
|
||||
exports.options = options;
|
8
node_modules/jest-runtime/build/cli/index.d.ts
generated
vendored
Normal file
8
node_modules/jest-runtime/build/cli/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
export declare function run(cliArgv?: Config.Argv, cliInfo?: Array<string>): Promise<void>;
|
258
node_modules/jest-runtime/build/cli/index.js
generated
vendored
Normal file
258
node_modules/jest-runtime/build/cli/index.js
generated
vendored
Normal file
|
@ -0,0 +1,258 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.run = run;
|
||||
|
||||
function _os() {
|
||||
const data = require('os');
|
||||
|
||||
_os = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function path() {
|
||||
const data = _interopRequireWildcard(require('path'));
|
||||
|
||||
path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _yargs() {
|
||||
const data = _interopRequireDefault(require('yargs'));
|
||||
|
||||
_yargs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _console() {
|
||||
const data = require('@jest/console');
|
||||
|
||||
_console = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestUtil() {
|
||||
const data = require('jest-util');
|
||||
|
||||
_jestUtil = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestValidate() {
|
||||
const data = require('jest-validate');
|
||||
|
||||
_jestValidate = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestConfig() {
|
||||
const data = require('jest-config');
|
||||
|
||||
_jestConfig = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _version() {
|
||||
const data = require('../version');
|
||||
|
||||
_version = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var args = _interopRequireWildcard(require('./args'));
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _getRequireWildcardCache() {
|
||||
if (typeof WeakMap !== 'function') return null;
|
||||
var cache = new WeakMap();
|
||||
_getRequireWildcardCache = function () {
|
||||
return cache;
|
||||
};
|
||||
return cache;
|
||||
}
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
return {default: obj};
|
||||
}
|
||||
var cache = _getRequireWildcardCache();
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {};
|
||||
var hasPropertyDescriptor =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
async function run(cliArgv, cliInfo) {
|
||||
let argv;
|
||||
|
||||
if (cliArgv) {
|
||||
argv = cliArgv;
|
||||
} else {
|
||||
argv = _yargs()
|
||||
.default.usage(args.usage)
|
||||
.help(false)
|
||||
.version(false)
|
||||
.options(args.options).argv;
|
||||
(0, _jestValidate().validateCLIOptions)(argv, {
|
||||
...args.options,
|
||||
deprecationEntries: _jestConfig().deprecationEntries
|
||||
});
|
||||
}
|
||||
|
||||
if (argv.help) {
|
||||
_yargs().default.showHelp();
|
||||
|
||||
process.on('exit', () => (process.exitCode = 1));
|
||||
return;
|
||||
}
|
||||
|
||||
if (argv.version) {
|
||||
console.log(`v${_version().VERSION}\n`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!argv._.length) {
|
||||
console.log('Please provide a path to a script. (See --help for details)');
|
||||
process.on('exit', () => (process.exitCode = 1));
|
||||
return;
|
||||
}
|
||||
|
||||
const root = (0, _jestUtil().tryRealpath)(process.cwd());
|
||||
const filePath = path().resolve(root, argv._[0]);
|
||||
|
||||
if (argv.debug) {
|
||||
const info = cliInfo ? ', ' + cliInfo.join(', ') : '';
|
||||
console.log(`Using Jest Runtime v${_version().VERSION}${info}`);
|
||||
}
|
||||
|
||||
const options = await (0, _jestConfig().readConfig)(argv, root);
|
||||
const globalConfig = options.globalConfig; // Always disable automocking in scripts.
|
||||
|
||||
const config = {...options.projectConfig, automock: false}; // Break circular dependency
|
||||
|
||||
const Runtime = require('..');
|
||||
|
||||
try {
|
||||
var _runtime$unstable_sho2;
|
||||
|
||||
const hasteMap = await Runtime.createContext(config, {
|
||||
maxWorkers: Math.max((0, _os().cpus)().length - 1, 1),
|
||||
watchman: globalConfig.watchman
|
||||
});
|
||||
|
||||
const Environment = require(config.testEnvironment);
|
||||
|
||||
const environment = new Environment(config);
|
||||
(0, _jestUtil().setGlobal)(
|
||||
environment.global,
|
||||
'console',
|
||||
new (_console().CustomConsole)(process.stdout, process.stderr)
|
||||
);
|
||||
(0, _jestUtil().setGlobal)(environment.global, 'jestProjectConfig', config);
|
||||
(0, _jestUtil().setGlobal)(
|
||||
environment.global,
|
||||
'jestGlobalConfig',
|
||||
globalConfig
|
||||
);
|
||||
const runtime = new Runtime(config, environment, hasteMap.resolver);
|
||||
|
||||
for (const path of config.setupFiles) {
|
||||
var _runtime$unstable_sho;
|
||||
|
||||
// TODO: remove ? in Jest 26
|
||||
const esm =
|
||||
(_runtime$unstable_sho = runtime.unstable_shouldLoadAsEsm) === null ||
|
||||
_runtime$unstable_sho === void 0
|
||||
? void 0
|
||||
: _runtime$unstable_sho.call(runtime, path);
|
||||
|
||||
if (esm) {
|
||||
await runtime.unstable_importModule(path);
|
||||
} else {
|
||||
runtime.requireModule(path);
|
||||
}
|
||||
} // TODO: remove ? in Jest 26
|
||||
|
||||
const esm =
|
||||
(_runtime$unstable_sho2 = runtime.unstable_shouldLoadAsEsm) === null ||
|
||||
_runtime$unstable_sho2 === void 0
|
||||
? void 0
|
||||
: _runtime$unstable_sho2.call(runtime, filePath);
|
||||
|
||||
if (esm) {
|
||||
await runtime.unstable_importModule(filePath);
|
||||
} else {
|
||||
runtime.requireModule(filePath);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(_chalk().default.red(e.stack || e));
|
||||
process.on('exit', () => (process.exitCode = 1));
|
||||
}
|
||||
}
|
10
node_modules/jest-runtime/build/helpers.d.ts
generated
vendored
Normal file
10
node_modules/jest-runtime/build/helpers.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
export declare const createOutsideJestVmPath: (path: string) => string;
|
||||
export declare const decodePossibleOutsideJestVmPath: (outsideJestVmPath: string) => string | undefined;
|
||||
export declare const findSiblingsWithFileExtension: (moduleFileExtensions: Config.ProjectConfig['moduleFileExtensions'], from: Config.Path, moduleName: string) => string;
|
154
node_modules/jest-runtime/build/helpers.js
generated
vendored
Normal file
154
node_modules/jest-runtime/build/helpers.js
generated
vendored
Normal file
|
@ -0,0 +1,154 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.findSiblingsWithFileExtension = exports.decodePossibleOutsideJestVmPath = exports.createOutsideJestVmPath = void 0;
|
||||
|
||||
function path() {
|
||||
const data = _interopRequireWildcard(require('path'));
|
||||
|
||||
path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _slash() {
|
||||
const data = _interopRequireDefault(require('slash'));
|
||||
|
||||
_slash = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _glob() {
|
||||
const data = _interopRequireDefault(require('glob'));
|
||||
|
||||
_glob = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _getRequireWildcardCache() {
|
||||
if (typeof WeakMap !== 'function') return null;
|
||||
var cache = new WeakMap();
|
||||
_getRequireWildcardCache = function () {
|
||||
return cache;
|
||||
};
|
||||
return cache;
|
||||
}
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
}
|
||||
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
return {default: obj};
|
||||
}
|
||||
var cache = _getRequireWildcardCache();
|
||||
if (cache && cache.has(obj)) {
|
||||
return cache.get(obj);
|
||||
}
|
||||
var newObj = {};
|
||||
var hasPropertyDescriptor =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor;
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = hasPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: null;
|
||||
if (desc && (desc.get || desc.set)) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
if (cache) {
|
||||
cache.set(obj, newObj);
|
||||
}
|
||||
return newObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
const OUTSIDE_JEST_VM_PROTOCOL = 'jest-main:'; // String manipulation is easier here, fileURLToPath is only in newer Nodes,
|
||||
// plus setting non-standard protocols on URL objects is difficult.
|
||||
|
||||
const createOutsideJestVmPath = path =>
|
||||
OUTSIDE_JEST_VM_PROTOCOL + '//' + encodeURIComponent(path);
|
||||
|
||||
exports.createOutsideJestVmPath = createOutsideJestVmPath;
|
||||
|
||||
const decodePossibleOutsideJestVmPath = outsideJestVmPath => {
|
||||
if (outsideJestVmPath.startsWith(OUTSIDE_JEST_VM_PROTOCOL)) {
|
||||
return decodeURIComponent(
|
||||
outsideJestVmPath.replace(
|
||||
new RegExp('^' + OUTSIDE_JEST_VM_PROTOCOL + '//'),
|
||||
''
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
exports.decodePossibleOutsideJestVmPath = decodePossibleOutsideJestVmPath;
|
||||
|
||||
const findSiblingsWithFileExtension = (
|
||||
moduleFileExtensions,
|
||||
from,
|
||||
moduleName
|
||||
) => {
|
||||
if (!path().isAbsolute(moduleName) && path().extname(moduleName) === '') {
|
||||
const dirname = path().dirname(from);
|
||||
const pathToModule = path().resolve(dirname, moduleName);
|
||||
|
||||
try {
|
||||
const slashedDirname = (0, _slash().default)(dirname);
|
||||
|
||||
const matches = _glob()
|
||||
.default.sync(`${pathToModule}.*`)
|
||||
.map(match => (0, _slash().default)(match))
|
||||
.map(match => {
|
||||
const relativePath = path().posix.relative(slashedDirname, match);
|
||||
return path().posix.dirname(match) === slashedDirname
|
||||
? `./${relativePath}`
|
||||
: relativePath;
|
||||
})
|
||||
.map(match => `\t'${match}'`)
|
||||
.join('\n');
|
||||
|
||||
if (matches) {
|
||||
const foundMessage = `\n\nHowever, Jest was able to find:\n${matches}`;
|
||||
const mappedModuleFileExtensions = moduleFileExtensions
|
||||
.map(ext => `'${ext}'`)
|
||||
.join(', ');
|
||||
return (
|
||||
foundMessage +
|
||||
"\n\nYou might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently " +
|
||||
`[${mappedModuleFileExtensions}].\n\nSee https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring`
|
||||
);
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
return '';
|
||||
};
|
||||
|
||||
exports.findSiblingsWithFileExtension = findSiblingsWithFileExtension;
|
125
node_modules/jest-runtime/build/index.d.ts
generated
vendored
Normal file
125
node_modules/jest-runtime/build/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,125 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
import type { JestEnvironment } from '@jest/environment';
|
||||
import type { SourceMapRegistry } from '@jest/source-map';
|
||||
import { ShouldInstrumentOptions, shouldInstrument } from '@jest/transform';
|
||||
import type { V8CoverageResult } from '@jest/test-result';
|
||||
import HasteMap = require('jest-haste-map');
|
||||
import Resolver = require('jest-resolve');
|
||||
import type { Context as JestContext } from './types';
|
||||
import { options as cliOptions } from './cli/args';
|
||||
declare type HasteMapOptions = {
|
||||
console?: Console;
|
||||
maxWorkers: number;
|
||||
resetCache: boolean;
|
||||
watch?: boolean;
|
||||
watchman: boolean;
|
||||
};
|
||||
declare type InternalModuleOptions = {
|
||||
isInternalModule: boolean;
|
||||
supportsDynamicImport: boolean;
|
||||
supportsStaticESM: boolean;
|
||||
};
|
||||
declare namespace Runtime {
|
||||
type Context = JestContext;
|
||||
type RuntimeType = Runtime;
|
||||
}
|
||||
declare class Runtime {
|
||||
private _cacheFS;
|
||||
private _config;
|
||||
private _coverageOptions;
|
||||
private _currentlyExecutingModulePath;
|
||||
private _environment;
|
||||
private _explicitShouldMock;
|
||||
private _fakeTimersImplementation;
|
||||
private _internalModuleRegistry;
|
||||
private _isCurrentlyExecutingManualMock;
|
||||
private _mockFactories;
|
||||
private _mockMetaDataCache;
|
||||
private _mockRegistry;
|
||||
private _isolatedMockRegistry;
|
||||
private _moduleMocker;
|
||||
private _isolatedModuleRegistry;
|
||||
private _moduleRegistry;
|
||||
private _esmoduleRegistry;
|
||||
private _resolver;
|
||||
private _shouldAutoMock;
|
||||
private _shouldMockModuleCache;
|
||||
private _shouldUnmockTransitiveDependenciesCache;
|
||||
private _sourceMapRegistry;
|
||||
private _scriptTransformer;
|
||||
private _fileTransforms;
|
||||
private _v8CoverageInstrumenter;
|
||||
private _v8CoverageResult;
|
||||
private _transitiveShouldMock;
|
||||
private _unmockList;
|
||||
private _virtualMocks;
|
||||
private _moduleImplementation?;
|
||||
private jestObjectCaches;
|
||||
constructor(config: Config.ProjectConfig, environment: JestEnvironment, resolver: Resolver, cacheFS?: Record<string, string>, coverageOptions?: ShouldInstrumentOptions);
|
||||
static shouldInstrument: typeof shouldInstrument;
|
||||
static createContext(config: Config.ProjectConfig, options: {
|
||||
console?: Console;
|
||||
maxWorkers: number;
|
||||
watch?: boolean;
|
||||
watchman: boolean;
|
||||
}): Promise<JestContext>;
|
||||
static createHasteMap(config: Config.ProjectConfig, options?: HasteMapOptions): HasteMap;
|
||||
static createResolver(config: Config.ProjectConfig, moduleMap: HasteMap.ModuleMap): Resolver;
|
||||
static runCLI(args?: Config.Argv, info?: Array<string>): Promise<void>;
|
||||
static getCLIOptions(): typeof cliOptions;
|
||||
unstable_shouldLoadAsEsm: typeof import("jest-resolve/build/shouldLoadAsEsm").default;
|
||||
private loadEsmModule;
|
||||
private linkModules;
|
||||
unstable_importModule(from: Config.Path, moduleName?: string): Promise<void>;
|
||||
private loadCjsAsEsm;
|
||||
requireModule<T = unknown>(from: Config.Path, moduleName?: string, options?: InternalModuleOptions, isRequireActual?: boolean | null): T;
|
||||
requireInternalModule<T = unknown>(from: Config.Path, to?: string): T;
|
||||
requireActual<T = unknown>(from: Config.Path, moduleName: string): T;
|
||||
requireMock<T = unknown>(from: Config.Path, moduleName: string): T;
|
||||
private _loadModule;
|
||||
private _getFullTransformationOptions;
|
||||
requireModuleOrMock<T = unknown>(from: Config.Path, moduleName: string): T;
|
||||
isolateModules(fn: () => void): void;
|
||||
resetModules(): void;
|
||||
collectV8Coverage(): Promise<void>;
|
||||
stopCollectingV8Coverage(): Promise<void>;
|
||||
getAllCoverageInfoCopy(): JestEnvironment['global']['__coverage__'];
|
||||
getAllV8CoverageInfoCopy(): V8CoverageResult;
|
||||
getSourceMapInfo(_coveredFiles: Set<string>): Record<string, string>;
|
||||
getSourceMaps(): SourceMapRegistry;
|
||||
setMock(from: string, moduleName: string, mockFactory: () => unknown, options?: {
|
||||
virtual?: boolean;
|
||||
}): void;
|
||||
restoreAllMocks(): void;
|
||||
resetAllMocks(): void;
|
||||
clearAllMocks(): void;
|
||||
teardown(): void;
|
||||
private _resolveModule;
|
||||
private _requireResolve;
|
||||
private _requireResolvePaths;
|
||||
private _execModule;
|
||||
private transformFile;
|
||||
private createScriptFromCode;
|
||||
private _requireCoreModule;
|
||||
private _importCoreModule;
|
||||
private _getMockedNativeModule;
|
||||
private _generateMock;
|
||||
private _shouldMock;
|
||||
private _createRequireImplementation;
|
||||
private _createJestObjectFor;
|
||||
private _logFormattedReferenceError;
|
||||
private wrapCodeInModuleWrapper;
|
||||
private constructInjectedModuleParameters;
|
||||
private handleExecutionError;
|
||||
private getGlobalsForCjs;
|
||||
private getGlobalsForEsm;
|
||||
private getGlobalsFromEnvironment;
|
||||
private readFile;
|
||||
}
|
||||
export = Runtime;
|
1927
node_modules/jest-runtime/build/index.js
generated
vendored
Normal file
1927
node_modules/jest-runtime/build/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
15
node_modules/jest-runtime/build/types.d.ts
generated
vendored
Normal file
15
node_modules/jest-runtime/build/types.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
import type { ResolverType } from 'jest-resolve';
|
||||
import type { FS as HasteFS, ModuleMap } from 'jest-haste-map';
|
||||
export declare type Context = {
|
||||
config: Config.ProjectConfig;
|
||||
hasteFS: HasteFS;
|
||||
moduleMap: ModuleMap;
|
||||
resolver: ResolverType;
|
||||
};
|
1
node_modules/jest-runtime/build/types.js
generated
vendored
Normal file
1
node_modules/jest-runtime/build/types.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
'use strict';
|
7
node_modules/jest-runtime/build/version.d.ts
generated
vendored
Normal file
7
node_modules/jest-runtime/build/version.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
export declare const VERSION: string;
|
17
node_modules/jest-runtime/build/version.js
generated
vendored
Normal file
17
node_modules/jest-runtime/build/version.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.VERSION = void 0;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
// For some reason, doing `require`ing here works, while inside `cli` fails
|
||||
const VERSION = require('../package.json').version;
|
||||
|
||||
exports.VERSION = VERSION;
|
58
node_modules/jest-runtime/package.json
generated
vendored
Normal file
58
node_modules/jest-runtime/package.json
generated
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"name": "jest-runtime",
|
||||
"version": "26.4.2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/jest.git",
|
||||
"directory": "packages/jest-runtime"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
"dependencies": {
|
||||
"@jest/console": "^26.3.0",
|
||||
"@jest/environment": "^26.3.0",
|
||||
"@jest/fake-timers": "^26.3.0",
|
||||
"@jest/globals": "^26.4.2",
|
||||
"@jest/source-map": "^26.3.0",
|
||||
"@jest/test-result": "^26.3.0",
|
||||
"@jest/transform": "^26.3.0",
|
||||
"@jest/types": "^26.3.0",
|
||||
"@types/yargs": "^15.0.0",
|
||||
"chalk": "^4.0.0",
|
||||
"collect-v8-coverage": "^1.0.0",
|
||||
"exit": "^0.1.2",
|
||||
"glob": "^7.1.3",
|
||||
"graceful-fs": "^4.2.4",
|
||||
"jest-config": "^26.4.2",
|
||||
"jest-haste-map": "^26.3.0",
|
||||
"jest-message-util": "^26.3.0",
|
||||
"jest-mock": "^26.3.0",
|
||||
"jest-regex-util": "^26.0.0",
|
||||
"jest-resolve": "^26.4.0",
|
||||
"jest-snapshot": "^26.4.2",
|
||||
"jest-util": "^26.3.0",
|
||||
"jest-validate": "^26.4.2",
|
||||
"slash": "^3.0.0",
|
||||
"strip-bom": "^4.0.0",
|
||||
"yargs": "^15.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/test-utils": "^26.3.0",
|
||||
"@types/exit": "^0.1.30",
|
||||
"@types/glob": "^7.1.1",
|
||||
"@types/graceful-fs": "^4.1.2",
|
||||
"@types/node": "^14.0.27",
|
||||
"execa": "^4.0.0",
|
||||
"jest-environment-node": "^26.3.0",
|
||||
"jest-snapshot-serializer-raw": "^1.1.0"
|
||||
},
|
||||
"bin": "./bin/jest-runtime.js",
|
||||
"engines": {
|
||||
"node": ">= 10.14.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "2586a798260886c28b6d28256cdfe354e039d5d1"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue