mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 21:14:45 +00:00
.
This commit is contained in:
parent
beb1329f9f
commit
2b95e76931
7736 changed files with 1874747 additions and 51184 deletions
23
node_modules/jest/LICENSE
generated
vendored
Normal file
23
node_modules/jest/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
MIT License
|
||||
|
||||
For Jest software
|
||||
|
||||
Copyright (c) 2014-present, Facebook, Inc.
|
||||
|
||||
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.
|
11
node_modules/jest/README.md
generated
vendored
Normal file
11
node_modules/jest/README.md
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Jest
|
||||
|
||||
🃏 Delightful JavaScript Testing
|
||||
|
||||
- **👩🏻💻 Developer Ready**: Complete and ready to set-up JavaScript testing solution. Works out of the box for any React project.
|
||||
|
||||
- **🏃🏽 Instant Feedback**: Failed tests run first. Fast interactive mode can switch between running all tests or only test files related to changed files.
|
||||
|
||||
- **📸 Snapshot Testing**: Jest can [capture snapshots](https://jestjs.io/docs/snapshot-testing.html) of React trees or other serializable values to simplify UI testing.
|
||||
|
||||
Read More: https://jestjs.io/
|
13
node_modules/jest/bin/jest.js
generated
vendored
Executable file
13
node_modules/jest/bin/jest.js
generated
vendored
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* 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 importLocal = require('import-local');
|
||||
|
||||
if (!importLocal(__filename)) {
|
||||
require('jest-cli/bin/jest');
|
||||
}
|
9
node_modules/jest/build/jest.d.ts
generated
vendored
Normal file
9
node_modules/jest/build/jest.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 * as cli from 'jest-cli';
|
||||
export = cli;
|
||||
//# sourceMappingURL=jest.d.ts.map
|
1
node_modules/jest/build/jest.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/build/jest.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"jest.d.ts","sourceRoot":"","sources":["../src/jest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC,SAAS,GAAG,CAAC"}
|
44
node_modules/jest/build/jest.js
generated
vendored
Normal file
44
node_modules/jest/build/jest.js
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
'use strict';
|
||||
|
||||
function cli() {
|
||||
const data = _interopRequireWildcard(require('jest-cli'));
|
||||
|
||||
cli = function cli() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
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.
|
||||
*/
|
||||
module.exports = cli();
|
1
node_modules/jest/node_modules/.bin/jest
generated
vendored
Symbolic link
1
node_modules/jest/node_modules/.bin/jest
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../jest-cli/bin/jest.js
|
23
node_modules/jest/node_modules/jest-cli/LICENSE
generated
vendored
Normal file
23
node_modules/jest/node_modules/jest-cli/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
MIT License
|
||||
|
||||
For Jest software
|
||||
|
||||
Copyright (c) 2014-present, Facebook, Inc.
|
||||
|
||||
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.
|
11
node_modules/jest/node_modules/jest-cli/README.md
generated
vendored
Normal file
11
node_modules/jest/node_modules/jest-cli/README.md
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Jest
|
||||
|
||||
🃏 Delightful JavaScript Testing
|
||||
|
||||
- **👩🏻💻 Developer Ready**: Complete and ready to set-up JavaScript testing solution. Works out of the box for any React project.
|
||||
|
||||
- **🏃🏽 Instant Feedback**: Failed tests run first. Fast interactive mode can switch between running all tests or only test files related to changed files.
|
||||
|
||||
- **📸 Snapshot Testing**: Jest can [capture snapshots](https://jestjs.io/docs/snapshot-testing.html) of React trees or other serializable values to simplify UI testing.
|
||||
|
||||
Read More: https://jestjs.io/
|
17
node_modules/jest/node_modules/jest-cli/bin/jest.js
generated
vendored
Executable file
17
node_modules/jest/node_modules/jest-cli/bin/jest.js
generated
vendored
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* 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 importLocal = require('import-local');
|
||||
|
||||
if (!importLocal(__filename)) {
|
||||
if (process.env.NODE_ENV == null) {
|
||||
process.env.NODE_ENV = 'test';
|
||||
}
|
||||
|
||||
require('../build/cli').run();
|
||||
}
|
573
node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts
generated
vendored
Normal file
573
node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,573 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
/// <reference types="yargs" />
|
||||
export declare const check: (argv: import("yargs").Arguments<Partial<{
|
||||
all: boolean;
|
||||
automock: boolean;
|
||||
bail: number | boolean;
|
||||
browser: boolean;
|
||||
cache: boolean;
|
||||
cacheDirectory: string;
|
||||
changedFilesWithAncestor: boolean;
|
||||
changedSince: string;
|
||||
ci: boolean;
|
||||
clearCache: boolean;
|
||||
clearMocks: boolean;
|
||||
collectCoverage: boolean;
|
||||
collectCoverageFrom: string;
|
||||
collectCoverageOnlyFrom: string[];
|
||||
color: boolean;
|
||||
colors: boolean;
|
||||
config: string;
|
||||
coverage: boolean;
|
||||
coverageDirectory: string;
|
||||
coveragePathIgnorePatterns: string[];
|
||||
coverageReporters: 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;
|
||||
json: boolean;
|
||||
lastCommit: boolean;
|
||||
logHeapUsage: boolean;
|
||||
maxWorkers: number;
|
||||
moduleDirectories: string[];
|
||||
moduleFileExtensions: string[];
|
||||
moduleNameMapper: string;
|
||||
modulePathIgnorePatterns: string[];
|
||||
modulePaths: string[];
|
||||
noStackTrace: boolean;
|
||||
notify: boolean;
|
||||
notifyMode: string;
|
||||
onlyChanged: boolean;
|
||||
outputFile: string;
|
||||
preset: string | null | undefined;
|
||||
projects: string[];
|
||||
prettierPath: string | null | undefined;
|
||||
resetMocks: boolean;
|
||||
resetModules: boolean;
|
||||
resolver: string | null | undefined;
|
||||
restoreMocks: boolean;
|
||||
rootDir: string;
|
||||
roots: string[];
|
||||
runInBand: boolean;
|
||||
setupFiles: string[];
|
||||
setupFilesAfterEnv: string[];
|
||||
showConfig: boolean;
|
||||
silent: boolean;
|
||||
snapshotSerializers: string[];
|
||||
testEnvironment: string;
|
||||
testFailureExitCode: string | null | undefined;
|
||||
testMatch: string[];
|
||||
testNamePattern: string;
|
||||
testPathIgnorePatterns: string[];
|
||||
testPathPattern: string[];
|
||||
testRegex: string | string[];
|
||||
testResultsProcessor: string | null | undefined;
|
||||
testRunner: string;
|
||||
testSequencer: string;
|
||||
testURL: string;
|
||||
timers: string;
|
||||
transform: string;
|
||||
transformIgnorePatterns: string[];
|
||||
unmockedModulePathPatterns: string[] | null | undefined;
|
||||
updateSnapshot: boolean;
|
||||
useStderr: boolean;
|
||||
verbose: boolean | null | undefined;
|
||||
version: boolean;
|
||||
watch: boolean;
|
||||
watchAll: boolean;
|
||||
watchman: boolean;
|
||||
watchPathIgnorePatterns: string[];
|
||||
}>>) => boolean;
|
||||
export declare const usage = "Usage: $0 [--config=<pathToConfigFile>] [TestPathPattern]";
|
||||
export declare const docs = "Documentation: https://jestjs.io/";
|
||||
export declare const options: {
|
||||
all: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
};
|
||||
automock: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
bail: {
|
||||
alias: string;
|
||||
default: undefined;
|
||||
description: string;
|
||||
};
|
||||
browser: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
cache: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
cacheDirectory: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
changedFilesWithAncestor: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
changedSince: {
|
||||
description: string;
|
||||
nargs: number;
|
||||
type: "string";
|
||||
};
|
||||
ci: {
|
||||
default: boolean;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
clearCache: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
clearMocks: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
collectCoverage: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
collectCoverageFrom: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
collectCoverageOnlyFrom: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
color: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
colors: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
config: {
|
||||
alias: string;
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
coverage: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
coverageDirectory: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
coveragePathIgnorePatterns: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
coverageReporters: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
coverageThreshold: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
debug: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
detectLeaks: {
|
||||
default: boolean;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
detectOpenHandles: {
|
||||
default: boolean;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
env: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
errorOnDeprecated: {
|
||||
default: boolean;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
expand: {
|
||||
alias: string;
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
filter: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
findRelatedTests: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
forceExit: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
globalSetup: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
globalTeardown: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
globals: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
haste: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
init: {
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
json: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
lastCommit: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
listTests: {
|
||||
default: boolean;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
logHeapUsage: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
mapCoverage: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
maxConcurrency: {
|
||||
default: number;
|
||||
description: string;
|
||||
type: "number";
|
||||
};
|
||||
maxWorkers: {
|
||||
alias: string;
|
||||
description: string;
|
||||
type: "number";
|
||||
};
|
||||
moduleDirectories: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
moduleFileExtensions: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
moduleNameMapper: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
modulePathIgnorePatterns: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
modulePaths: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
noStackTrace: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
notify: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
notifyMode: {
|
||||
default: string;
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
onlyChanged: {
|
||||
alias: string;
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
onlyFailures: {
|
||||
alias: string;
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
outputFile: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
passWithNoTests: {
|
||||
default: boolean;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
preset: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
prettierPath: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
projects: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
reporters: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
resetMocks: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
resetModules: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
resolver: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
restoreMocks: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
rootDir: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
roots: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
runInBand: {
|
||||
alias: string;
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
runTestsByPath: {
|
||||
default: boolean;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
runner: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
setupFiles: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
setupFilesAfterEnv: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
showConfig: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
silent: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
skipFilter: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
snapshotSerializers: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
testEnvironment: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
testEnvironmentOptions: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
testFailureExitCode: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
testLocationInResults: {
|
||||
default: boolean;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
testMatch: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
testNamePattern: {
|
||||
alias: string;
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
testPathIgnorePatterns: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
testPathPattern: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
testRegex: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
testResultsProcessor: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
testRunner: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
testSequencer: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
testURL: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
timers: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
transform: {
|
||||
description: string;
|
||||
type: "string";
|
||||
};
|
||||
transformIgnorePatterns: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
unmockedModulePathPatterns: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
updateSnapshot: {
|
||||
alias: string;
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
useStderr: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
verbose: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
version: {
|
||||
alias: string;
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
watch: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
watchAll: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
watchPathIgnorePatterns: {
|
||||
description: string;
|
||||
string: true;
|
||||
type: "array";
|
||||
};
|
||||
watchman: {
|
||||
default: undefined;
|
||||
description: string;
|
||||
type: "boolean";
|
||||
};
|
||||
};
|
||||
//# sourceMappingURL=args.d.ts.map
|
1
node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAMH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAmDjB,CAAC;AAEF,eAAO,MAAM,KAAK,8DAC2C,CAAC;AAC9D,eAAO,MAAM,IAAI,sCAAsC,CAAC;AAExD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqoBnB,CAAC"}
|
746
node_modules/jest/node_modules/jest-cli/build/cli/args.js
generated
vendored
Normal file
746
node_modules/jest/node_modules/jest-cli/build/cli/args.js
generated
vendored
Normal file
|
@ -0,0 +1,746 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.options = exports.docs = exports.usage = exports.check = void 0;
|
||||
|
||||
function _jestConfig() {
|
||||
const data = require('jest-config');
|
||||
|
||||
_jestConfig = function _jestConfig() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _isCi() {
|
||||
const data = _interopRequireDefault(require('is-ci'));
|
||||
|
||||
_isCi = function _isCi() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 check = argv => {
|
||||
if (argv.runInBand && argv.hasOwnProperty('maxWorkers')) {
|
||||
throw new Error(
|
||||
'Both --runInBand and --maxWorkers were specified, but these two ' +
|
||||
'options do not make sense together. Which is it?'
|
||||
);
|
||||
}
|
||||
|
||||
var _arr = [
|
||||
'onlyChanged',
|
||||
'lastCommit',
|
||||
'changedFilesWithAncestor',
|
||||
'changedSince'
|
||||
];
|
||||
|
||||
for (var _i = 0; _i < _arr.length; _i++) {
|
||||
const key = _arr[_i];
|
||||
|
||||
if (argv[key] && argv.watchAll) {
|
||||
throw new Error(
|
||||
`Both --${key} and --watchAll were specified, but these two ` +
|
||||
'options do not make sense together. Try the --watch option which ' +
|
||||
'reruns only tests related to changed files.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (argv.findRelatedTests && argv._.length === 0) {
|
||||
throw new Error(
|
||||
'The --findRelatedTests option requires file paths to be specified.\n' +
|
||||
'Example usage: jest --findRelatedTests ./src/source.js ' +
|
||||
'./src/index.js.'
|
||||
);
|
||||
}
|
||||
|
||||
if (argv.hasOwnProperty('maxWorkers') && argv.maxWorkers === undefined) {
|
||||
throw new Error(
|
||||
'The --maxWorkers (-w) option requires a number to be specified.\n' +
|
||||
'Example usage: jest --maxWorkers 2\n' +
|
||||
'Or did you mean --watch?'
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
argv.config &&
|
||||
!(0, _jestConfig().isJSONString)(argv.config) &&
|
||||
!argv.config.match(/\.js(on)?$/)
|
||||
) {
|
||||
throw new Error(
|
||||
'The --config option requires a JSON string literal, or a file path with a .js or .json extension.\n' +
|
||||
'Example usage: jest --config ./jest.config.js'
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
exports.check = check;
|
||||
const usage = 'Usage: $0 [--config=<pathToConfigFile>] [TestPathPattern]';
|
||||
exports.usage = usage;
|
||||
const docs = 'Documentation: https://jestjs.io/';
|
||||
exports.docs = docs;
|
||||
const options = {
|
||||
all: {
|
||||
default: undefined,
|
||||
description:
|
||||
'The opposite of `onlyChanged`. If `onlyChanged` is set by ' +
|
||||
'default, running jest with `--all` will force Jest to run all tests ' +
|
||||
'instead of running only tests related to changed files.'
|
||||
},
|
||||
automock: {
|
||||
default: undefined,
|
||||
description: 'Automock all files by default.',
|
||||
type: 'boolean'
|
||||
},
|
||||
bail: {
|
||||
alias: 'b',
|
||||
default: undefined,
|
||||
description:
|
||||
'Exit the test suite immediately after `n` number of failing tests.'
|
||||
},
|
||||
browser: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Respect the "browser" field in package.json ' +
|
||||
'when resolving modules. Some packages export different versions ' +
|
||||
'based on whether they are operating in node.js or a browser.',
|
||||
type: 'boolean'
|
||||
},
|
||||
cache: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Whether to use the transform cache. Disable the cache ' +
|
||||
'using --no-cache.',
|
||||
type: 'boolean'
|
||||
},
|
||||
cacheDirectory: {
|
||||
description:
|
||||
'The directory where Jest should store its cached ' +
|
||||
' dependency information.',
|
||||
type: 'string'
|
||||
},
|
||||
changedFilesWithAncestor: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Runs tests related to the current changes and the changes made in the ' +
|
||||
'last commit. Behaves similarly to `--onlyChanged`.',
|
||||
type: 'boolean'
|
||||
},
|
||||
changedSince: {
|
||||
description:
|
||||
'Runs tests related to the changes since the provided branch. If the ' +
|
||||
'current branch has diverged from the given branch, then only changes ' +
|
||||
'made locally will be tested. Behaves similarly to `--onlyChanged`.',
|
||||
nargs: 1,
|
||||
type: 'string'
|
||||
},
|
||||
ci: {
|
||||
default: _isCi().default,
|
||||
description:
|
||||
'Whether to run Jest in continuous integration (CI) mode. ' +
|
||||
'This option is on by default in most popular CI environments. It will ' +
|
||||
' prevent snapshots from being written unless explicitly requested.',
|
||||
type: 'boolean'
|
||||
},
|
||||
clearCache: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Clears the configured Jest cache directory and then exits. ' +
|
||||
'Default directory can be found by calling jest --showConfig',
|
||||
type: 'boolean'
|
||||
},
|
||||
clearMocks: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Automatically clear mock calls and instances between every ' +
|
||||
'test. Equivalent to calling jest.clearAllMocks() between each test.',
|
||||
type: 'boolean'
|
||||
},
|
||||
collectCoverage: {
|
||||
default: undefined,
|
||||
description: 'Alias for --coverage.',
|
||||
type: 'boolean'
|
||||
},
|
||||
collectCoverageFrom: {
|
||||
description:
|
||||
'A glob pattern relative to <rootDir> matching the files that coverage ' +
|
||||
'info needs to be collected from.',
|
||||
type: 'string'
|
||||
},
|
||||
collectCoverageOnlyFrom: {
|
||||
description: 'Explicit list of paths coverage will be restricted to.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
color: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Forces test results output color highlighting (even if ' +
|
||||
'stdout is not a TTY). Set to false if you would like to have no colors.',
|
||||
type: 'boolean'
|
||||
},
|
||||
colors: {
|
||||
default: undefined,
|
||||
description: 'Alias for `--color`.',
|
||||
type: 'boolean'
|
||||
},
|
||||
config: {
|
||||
alias: 'c',
|
||||
description:
|
||||
'The path to a jest config file specifying how to find ' +
|
||||
'and execute tests. If no rootDir is set in the config, the directory ' +
|
||||
'containing the config file is assumed to be the rootDir for the project.' +
|
||||
'This can also be a JSON encoded value which Jest will use as configuration.',
|
||||
type: 'string'
|
||||
},
|
||||
coverage: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Indicates that test coverage information should be ' +
|
||||
'collected and reported in the output.',
|
||||
type: 'boolean'
|
||||
},
|
||||
coverageDirectory: {
|
||||
description: 'The directory where Jest should output its coverage files.',
|
||||
type: 'string'
|
||||
},
|
||||
coveragePathIgnorePatterns: {
|
||||
description:
|
||||
'An array of regexp pattern strings that are matched ' +
|
||||
'against all file paths before executing the test. If the file path' +
|
||||
'matches any of the patterns, coverage information will be skipped.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
coverageReporters: {
|
||||
description:
|
||||
'A list of reporter names that Jest uses when writing ' +
|
||||
'coverage reports. Any istanbul reporter can be used.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
coverageThreshold: {
|
||||
description:
|
||||
'A JSON string with which will be used to configure ' +
|
||||
'minimum threshold enforcement for coverage results',
|
||||
type: 'string'
|
||||
},
|
||||
debug: {
|
||||
default: undefined,
|
||||
description: 'Print debugging info about your jest config.',
|
||||
type: 'boolean'
|
||||
},
|
||||
detectLeaks: {
|
||||
default: false,
|
||||
description:
|
||||
'**EXPERIMENTAL**: Detect memory leaks in tests. After executing a ' +
|
||||
'test, it will try to garbage collect the global object used, and fail ' +
|
||||
'if it was leaked',
|
||||
type: 'boolean'
|
||||
},
|
||||
detectOpenHandles: {
|
||||
default: false,
|
||||
description:
|
||||
'Print out remaining open handles preventing Jest from exiting at the ' +
|
||||
'end of a test run. Implies `runInBand`.',
|
||||
type: 'boolean'
|
||||
},
|
||||
env: {
|
||||
description:
|
||||
'The test environment used for all tests. This can point to ' +
|
||||
'any file or node module. Examples: `jsdom`, `node` or ' +
|
||||
'`path/to/my-environment.js`',
|
||||
type: 'string'
|
||||
},
|
||||
errorOnDeprecated: {
|
||||
default: false,
|
||||
description: 'Make calling deprecated APIs throw helpful error messages.',
|
||||
type: 'boolean'
|
||||
},
|
||||
expand: {
|
||||
alias: 'e',
|
||||
default: undefined,
|
||||
description: 'Use this flag to show full diffs instead of a patch.',
|
||||
type: 'boolean'
|
||||
},
|
||||
filter: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Path to a module exporting a filtering function. This method receives ' +
|
||||
'a list of tests which can be manipulated to exclude tests from ' +
|
||||
'running. Especially useful when used in conjunction with a testing ' +
|
||||
'infrastructure to filter known broken tests.',
|
||||
type: 'string'
|
||||
},
|
||||
findRelatedTests: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Find related tests for a list of source files that were ' +
|
||||
'passed in as arguments. Useful for pre-commit hook integration to run ' +
|
||||
'the minimal amount of tests necessary.',
|
||||
type: 'boolean'
|
||||
},
|
||||
forceExit: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Force Jest to exit after all tests have completed running. ' +
|
||||
'This is useful when resources set up by test code cannot be ' +
|
||||
'adequately cleaned up.',
|
||||
type: 'boolean'
|
||||
},
|
||||
globalSetup: {
|
||||
description: 'The path to a module that runs before All Tests.',
|
||||
type: 'string'
|
||||
},
|
||||
globalTeardown: {
|
||||
description: 'The path to a module that runs after All Tests.',
|
||||
type: 'string'
|
||||
},
|
||||
globals: {
|
||||
description:
|
||||
'A JSON string with map of global variables that need ' +
|
||||
'to be available in all test environments.',
|
||||
type: 'string'
|
||||
},
|
||||
haste: {
|
||||
description:
|
||||
'A JSON string with map of variables for the haste module system',
|
||||
type: 'string'
|
||||
},
|
||||
init: {
|
||||
description: 'Generate a basic configuration file',
|
||||
type: 'boolean'
|
||||
},
|
||||
json: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Prints the test results in JSON. This mode will send all ' +
|
||||
'other test output and user messages to stderr.',
|
||||
type: 'boolean'
|
||||
},
|
||||
lastCommit: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Run all tests affected by file changes in the last commit made. ' +
|
||||
'Behaves similarly to `--onlyChanged`.',
|
||||
type: 'boolean'
|
||||
},
|
||||
listTests: {
|
||||
default: false,
|
||||
description:
|
||||
'Lists all tests Jest will run given the arguments and ' +
|
||||
'exits. Most useful in a CI system together with `--findRelatedTests` ' +
|
||||
'to determine the tests Jest will run based on specific files',
|
||||
type: 'boolean'
|
||||
},
|
||||
logHeapUsage: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Logs the heap usage after every test. Useful to debug ' +
|
||||
'memory leaks. Use together with `--runInBand` and `--expose-gc` in ' +
|
||||
'node.',
|
||||
type: 'boolean'
|
||||
},
|
||||
mapCoverage: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Maps code coverage reports against original source code ' +
|
||||
'when transformers supply source maps.\n\nDEPRECATED',
|
||||
type: 'boolean'
|
||||
},
|
||||
maxConcurrency: {
|
||||
default: 5,
|
||||
description:
|
||||
'Specifies the maximum number of tests that are allowed to run' +
|
||||
'concurrently. This only affects tests using `test.concurrent`.',
|
||||
type: 'number'
|
||||
},
|
||||
maxWorkers: {
|
||||
alias: 'w',
|
||||
description:
|
||||
'Specifies the maximum number of workers the worker-pool ' +
|
||||
'will spawn for running tests. This defaults to the number of the ' +
|
||||
'cores available on your machine. (its usually best not to override ' +
|
||||
'this default)',
|
||||
type: 'number'
|
||||
},
|
||||
moduleDirectories: {
|
||||
description:
|
||||
'An array of directory names to be searched recursively ' +
|
||||
"up from the requiring module's location.",
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
moduleFileExtensions: {
|
||||
description:
|
||||
'An array of file extensions your modules use. If you ' +
|
||||
'require modules without specifying a file extension, these are the ' +
|
||||
'extensions Jest will look for. ',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
moduleNameMapper: {
|
||||
description:
|
||||
'A JSON string with a map from regular expressions to ' +
|
||||
'module names that allow to stub out resources, like images or ' +
|
||||
'styles with a single module',
|
||||
type: 'string'
|
||||
},
|
||||
modulePathIgnorePatterns: {
|
||||
description:
|
||||
'An array of regexp pattern strings that are matched ' +
|
||||
'against all module paths before those paths are to be considered ' +
|
||||
'"visible" to the module loader.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
modulePaths: {
|
||||
description:
|
||||
'An alternative API to setting the NODE_PATH env variable, ' +
|
||||
'modulePaths is an array of absolute paths to additional locations to ' +
|
||||
'search when resolving modules.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
noStackTrace: {
|
||||
default: undefined,
|
||||
description: 'Disables stack trace in test results output',
|
||||
type: 'boolean'
|
||||
},
|
||||
notify: {
|
||||
default: undefined,
|
||||
description: 'Activates notifications for test results.',
|
||||
type: 'boolean'
|
||||
},
|
||||
notifyMode: {
|
||||
default: 'failure-change',
|
||||
description: 'Specifies when notifications will appear for test results.',
|
||||
type: 'string'
|
||||
},
|
||||
onlyChanged: {
|
||||
alias: 'o',
|
||||
default: undefined,
|
||||
description:
|
||||
'Attempts to identify which tests to run based on which ' +
|
||||
"files have changed in the current repository. Only works if you're " +
|
||||
'running tests in a git or hg repository at the moment.',
|
||||
type: 'boolean'
|
||||
},
|
||||
onlyFailures: {
|
||||
alias: 'f',
|
||||
default: undefined,
|
||||
description: 'Run tests that failed in the previous execution.',
|
||||
type: 'boolean'
|
||||
},
|
||||
outputFile: {
|
||||
description:
|
||||
'Write test results to a file when the --json option is ' +
|
||||
'also specified.',
|
||||
type: 'string'
|
||||
},
|
||||
passWithNoTests: {
|
||||
default: false,
|
||||
description:
|
||||
'Will not fail if no tests are found (for example while using `--testPathPattern`.)',
|
||||
type: 'boolean'
|
||||
},
|
||||
preset: {
|
||||
description: "A preset that is used as a base for Jest's configuration.",
|
||||
type: 'string'
|
||||
},
|
||||
prettierPath: {
|
||||
default: undefined,
|
||||
description: 'The path to the "prettier" module used for inline snapshots.',
|
||||
type: 'string'
|
||||
},
|
||||
projects: {
|
||||
description:
|
||||
'A list of projects that use Jest to run all tests of all ' +
|
||||
'projects in a single instance of Jest.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
reporters: {
|
||||
description: 'A list of custom reporters for the test suite.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
resetMocks: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Automatically reset mock state between every test. ' +
|
||||
'Equivalent to calling jest.resetAllMocks() between each test.',
|
||||
type: 'boolean'
|
||||
},
|
||||
resetModules: {
|
||||
default: undefined,
|
||||
description:
|
||||
'If enabled, the module registry for every test file will ' +
|
||||
'be reset before running each individual test.',
|
||||
type: 'boolean'
|
||||
},
|
||||
resolver: {
|
||||
description: 'A JSON string which allows the use of a custom resolver.',
|
||||
type: 'string'
|
||||
},
|
||||
restoreMocks: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Automatically restore mock state and implementation between every test. ' +
|
||||
'Equivalent to calling jest.restoreAllMocks() between each test.',
|
||||
type: 'boolean'
|
||||
},
|
||||
rootDir: {
|
||||
description:
|
||||
'The root directory that Jest should scan for tests and ' +
|
||||
'modules within.',
|
||||
type: 'string'
|
||||
},
|
||||
roots: {
|
||||
description:
|
||||
'A list of paths to directories that Jest should use to ' +
|
||||
'search for files in.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
runInBand: {
|
||||
alias: 'i',
|
||||
default: undefined,
|
||||
description:
|
||||
'Run all tests serially in the current process (rather than ' +
|
||||
'creating a worker pool of child processes that run tests). This ' +
|
||||
'is sometimes useful for debugging, but such use cases are pretty ' +
|
||||
'rare.',
|
||||
type: 'boolean'
|
||||
},
|
||||
runTestsByPath: {
|
||||
default: false,
|
||||
description:
|
||||
'Used when provided patterns are exact file paths. This avoids ' +
|
||||
'converting them into a regular expression and matching it against ' +
|
||||
'every single file.',
|
||||
type: 'boolean'
|
||||
},
|
||||
runner: {
|
||||
description:
|
||||
"Allows to use a custom runner instead of Jest's default test runner.",
|
||||
type: 'string'
|
||||
},
|
||||
setupFiles: {
|
||||
description:
|
||||
'A list of paths to modules that run some code to configure or ' +
|
||||
'set up the testing environment before each test. ',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
setupFilesAfterEnv: {
|
||||
description:
|
||||
'A list of paths to modules that run some code to configure or ' +
|
||||
'set up the testing framework before each test ',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
showConfig: {
|
||||
default: undefined,
|
||||
description: 'Print your jest config and then exits.',
|
||||
type: 'boolean'
|
||||
},
|
||||
silent: {
|
||||
default: undefined,
|
||||
description: 'Prevent tests from printing messages through the console.',
|
||||
type: 'boolean'
|
||||
},
|
||||
skipFilter: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Disables the filter provided by --filter. Useful for CI jobs, or ' +
|
||||
'local enforcement when fixing tests.',
|
||||
type: 'boolean'
|
||||
},
|
||||
snapshotSerializers: {
|
||||
description:
|
||||
'A list of paths to snapshot serializer modules Jest should ' +
|
||||
'use for snapshot testing.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
testEnvironment: {
|
||||
description: 'Alias for --env',
|
||||
type: 'string'
|
||||
},
|
||||
testEnvironmentOptions: {
|
||||
description:
|
||||
'Test environment options that will be passed to the testEnvironment. ' +
|
||||
'The relevant options depend on the environment.',
|
||||
type: 'string' // Object
|
||||
},
|
||||
testFailureExitCode: {
|
||||
description: 'Exit code of `jest` command if the test run failed',
|
||||
type: 'string' // number
|
||||
},
|
||||
testLocationInResults: {
|
||||
default: false,
|
||||
description: 'Add `location` information to the test results',
|
||||
type: 'boolean'
|
||||
},
|
||||
testMatch: {
|
||||
description: 'The glob patterns Jest uses to detect test files.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
testNamePattern: {
|
||||
alias: 't',
|
||||
description: 'Run only tests with a name that matches the regex pattern.',
|
||||
type: 'string'
|
||||
},
|
||||
testPathIgnorePatterns: {
|
||||
description:
|
||||
'An array of regexp pattern strings that are matched ' +
|
||||
'against all test paths before executing the test. If the test path ' +
|
||||
'matches any of the patterns, it will be skipped.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
testPathPattern: {
|
||||
description:
|
||||
'A regexp pattern string that is matched against all tests ' +
|
||||
'paths before executing the test.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
testRegex: {
|
||||
description:
|
||||
'A string or array of string regexp patterns that Jest uses to detect test files.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
testResultsProcessor: {
|
||||
description:
|
||||
'Allows the use of a custom results processor. ' +
|
||||
'This processor must be a node module that exports ' +
|
||||
'a function expecting as the first argument the result object.',
|
||||
type: 'string'
|
||||
},
|
||||
testRunner: {
|
||||
description:
|
||||
'Allows to specify a custom test runner. The default is ' +
|
||||
' `jasmine2`. A path to a custom test runner can be provided: ' +
|
||||
'`<rootDir>/path/to/testRunner.js`.',
|
||||
type: 'string'
|
||||
},
|
||||
testSequencer: {
|
||||
description:
|
||||
'Allows to specify a custom test sequencer. The default is ' +
|
||||
'`@jest/test-sequencer`. A path to a custom test sequencer can be ' +
|
||||
'provided: `<rootDir>/path/to/testSequencer.js`',
|
||||
type: 'string'
|
||||
},
|
||||
testURL: {
|
||||
description: 'This option sets the URL for the jsdom environment.',
|
||||
type: 'string'
|
||||
},
|
||||
timers: {
|
||||
description:
|
||||
'Setting this value to fake allows the use of fake timers ' +
|
||||
'for functions such as setTimeout.',
|
||||
type: 'string'
|
||||
},
|
||||
transform: {
|
||||
description:
|
||||
'A JSON string which maps from regular expressions to paths ' +
|
||||
'to transformers.',
|
||||
type: 'string'
|
||||
},
|
||||
transformIgnorePatterns: {
|
||||
description:
|
||||
'An array of regexp pattern strings that are matched ' +
|
||||
'against all source file paths before transformation.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
unmockedModulePathPatterns: {
|
||||
description:
|
||||
'An array of regexp pattern strings that are matched ' +
|
||||
'against all modules before the module loader will automatically ' +
|
||||
'return a mock for them.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
updateSnapshot: {
|
||||
alias: 'u',
|
||||
default: undefined,
|
||||
description:
|
||||
'Use this flag to re-record snapshots. ' +
|
||||
'Can be used together with a test suite pattern or with ' +
|
||||
'`--testNamePattern` to re-record snapshot for test matching ' +
|
||||
'the pattern',
|
||||
type: 'boolean'
|
||||
},
|
||||
useStderr: {
|
||||
default: undefined,
|
||||
description: 'Divert all output to stderr.',
|
||||
type: 'boolean'
|
||||
},
|
||||
verbose: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Display individual test results with the test suite hierarchy.',
|
||||
type: 'boolean'
|
||||
},
|
||||
version: {
|
||||
alias: 'v',
|
||||
default: undefined,
|
||||
description: 'Print the version and exit',
|
||||
type: 'boolean'
|
||||
},
|
||||
watch: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Watch files for changes and rerun tests related to ' +
|
||||
'changed files. If you want to re-run all tests when a file has ' +
|
||||
'changed, use the `--watchAll` option.',
|
||||
type: 'boolean'
|
||||
},
|
||||
watchAll: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Watch files for changes and rerun all tests. If you want ' +
|
||||
'to re-run only the tests related to the changed files, use the ' +
|
||||
'`--watch` option.',
|
||||
type: 'boolean'
|
||||
},
|
||||
watchPathIgnorePatterns: {
|
||||
description:
|
||||
'An array of regexp pattern strings that are matched ' +
|
||||
'against all paths before trigger test re-run in watch mode. ' +
|
||||
'If the test path matches any of the patterns, it will be skipped.',
|
||||
string: true,
|
||||
type: 'array'
|
||||
},
|
||||
watchman: {
|
||||
default: undefined,
|
||||
description:
|
||||
'Whether to use watchman for file crawling. Disable using ' +
|
||||
'--no-watchman.',
|
||||
type: 'boolean'
|
||||
}
|
||||
};
|
||||
exports.options = options;
|
96
node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts
generated
vendored
Normal file
96
node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,96 @@
|
|||
/**
|
||||
* 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 { Config } from '@jest/types';
|
||||
import yargs from 'yargs';
|
||||
export declare function run(maybeArgv?: Array<string>, project?: Config.Path): Promise<void>;
|
||||
export declare const buildArgv: (maybeArgv?: string[] | undefined) => yargs.Arguments<Partial<{
|
||||
all: boolean;
|
||||
automock: boolean;
|
||||
bail: number | boolean;
|
||||
browser: boolean;
|
||||
cache: boolean;
|
||||
cacheDirectory: string;
|
||||
changedFilesWithAncestor: boolean;
|
||||
changedSince: string;
|
||||
ci: boolean;
|
||||
clearCache: boolean;
|
||||
clearMocks: boolean;
|
||||
collectCoverage: boolean;
|
||||
collectCoverageFrom: string;
|
||||
collectCoverageOnlyFrom: string[];
|
||||
color: boolean;
|
||||
colors: boolean;
|
||||
config: string;
|
||||
coverage: boolean;
|
||||
coverageDirectory: string;
|
||||
coveragePathIgnorePatterns: string[];
|
||||
coverageReporters: 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;
|
||||
json: boolean;
|
||||
lastCommit: boolean;
|
||||
logHeapUsage: boolean;
|
||||
maxWorkers: number;
|
||||
moduleDirectories: string[];
|
||||
moduleFileExtensions: string[];
|
||||
moduleNameMapper: string;
|
||||
modulePathIgnorePatterns: string[];
|
||||
modulePaths: string[];
|
||||
noStackTrace: boolean;
|
||||
notify: boolean;
|
||||
notifyMode: string;
|
||||
onlyChanged: boolean;
|
||||
outputFile: string;
|
||||
preset: string | null | undefined;
|
||||
projects: string[];
|
||||
prettierPath: string | null | undefined;
|
||||
resetMocks: boolean;
|
||||
resetModules: boolean;
|
||||
resolver: string | null | undefined;
|
||||
restoreMocks: boolean;
|
||||
rootDir: string;
|
||||
roots: string[];
|
||||
runInBand: boolean;
|
||||
setupFiles: string[];
|
||||
setupFilesAfterEnv: string[];
|
||||
showConfig: boolean;
|
||||
silent: boolean;
|
||||
snapshotSerializers: string[];
|
||||
testEnvironment: string;
|
||||
testFailureExitCode: string | null | undefined;
|
||||
testMatch: string[];
|
||||
testNamePattern: string;
|
||||
testPathIgnorePatterns: string[];
|
||||
testPathPattern: string[];
|
||||
testRegex: string | string[];
|
||||
testResultsProcessor: string | null | undefined;
|
||||
testRunner: string;
|
||||
testSequencer: string;
|
||||
testURL: string;
|
||||
timers: string;
|
||||
transform: string;
|
||||
transformIgnorePatterns: string[];
|
||||
unmockedModulePathPatterns: string[] | null | undefined;
|
||||
updateSnapshot: boolean;
|
||||
useStderr: boolean;
|
||||
verbose: boolean | null | undefined;
|
||||
version: boolean;
|
||||
watch: boolean;
|
||||
watchAll: boolean;
|
||||
watchman: boolean;
|
||||
watchPathIgnorePatterns: string[];
|
||||
}>>;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAQnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,wBAAsB,GAAG,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,iBAoBzE;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCrB,CAAC"}
|
321
node_modules/jest/node_modules/jest-cli/build/cli/index.js
generated
vendored
Normal file
321
node_modules/jest/node_modules/jest-cli/build/cli/index.js
generated
vendored
Normal file
|
@ -0,0 +1,321 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.run = run;
|
||||
exports.buildArgv = void 0;
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require('path'));
|
||||
|
||||
_path = function _path() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestUtil() {
|
||||
const data = require('jest-util');
|
||||
|
||||
_jestUtil = function _jestUtil() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestValidate() {
|
||||
const data = require('jest-validate');
|
||||
|
||||
_jestValidate = function _jestValidate() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestConfig() {
|
||||
const data = require('jest-config');
|
||||
|
||||
_jestConfig = function _jestConfig() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _core() {
|
||||
const data = require('@jest/core');
|
||||
|
||||
_core = function _core() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _exit() {
|
||||
const data = _interopRequireDefault(require('exit'));
|
||||
|
||||
_exit = function _exit() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _yargs() {
|
||||
const data = _interopRequireDefault(require('yargs'));
|
||||
|
||||
_yargs = function _yargs() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _realpathNative() {
|
||||
const data = require('realpath-native');
|
||||
|
||||
_realpathNative = function _realpathNative() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _init = _interopRequireDefault(require('../init'));
|
||||
|
||||
var _version = _interopRequireDefault(require('../version'));
|
||||
|
||||
var args = _interopRequireWildcard(require('./args'));
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
return newObj;
|
||||
}
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(
|
||||
Object.getOwnPropertySymbols(source).filter(function(sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
})
|
||||
);
|
||||
}
|
||||
ownKeys.forEach(function(key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
Promise.resolve(value).then(_next, _throw);
|
||||
}
|
||||
}
|
||||
|
||||
function _asyncToGenerator(fn) {
|
||||
return function() {
|
||||
var self = this,
|
||||
args = arguments;
|
||||
return new Promise(function(resolve, reject) {
|
||||
var gen = fn.apply(self, args);
|
||||
function _next(value) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value);
|
||||
}
|
||||
function _throw(err) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err);
|
||||
}
|
||||
_next(undefined);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function run(_x, _x2) {
|
||||
return _run.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _run() {
|
||||
_run = _asyncToGenerator(function*(maybeArgv, project) {
|
||||
try {
|
||||
const argv = buildArgv(maybeArgv);
|
||||
|
||||
if (argv.init) {
|
||||
yield (0, _init.default)();
|
||||
return;
|
||||
}
|
||||
|
||||
const projects = getProjectListFromCLIArgs(argv, project);
|
||||
|
||||
const _ref = yield (0, _core().runCLI)(argv, projects),
|
||||
results = _ref.results,
|
||||
globalConfig = _ref.globalConfig;
|
||||
|
||||
readResultsAndExit(results, globalConfig);
|
||||
} catch (error) {
|
||||
(0, _jestUtil().clearLine)(process.stderr);
|
||||
(0, _jestUtil().clearLine)(process.stdout);
|
||||
console.error(_chalk().default.red(error.stack));
|
||||
(0, _exit().default)(1);
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
return _run.apply(this, arguments);
|
||||
}
|
||||
|
||||
const buildArgv = maybeArgv => {
|
||||
const version =
|
||||
(0, _version.default)() +
|
||||
(__dirname.includes(`packages${_path().default.sep}jest-cli`)
|
||||
? '-dev'
|
||||
: '');
|
||||
const rawArgv = maybeArgv || process.argv.slice(2);
|
||||
const argv = (0, _yargs().default)(rawArgv)
|
||||
.usage(args.usage)
|
||||
.version(version)
|
||||
.alias('help', 'h')
|
||||
.options(args.options)
|
||||
.epilogue(args.docs)
|
||||
.check(args.check).argv;
|
||||
(0, _jestValidate().validateCLIOptions)(
|
||||
argv,
|
||||
_objectSpread({}, args.options, {
|
||||
deprecationEntries: _jestConfig().deprecationEntries
|
||||
}), // strip leading dashes
|
||||
Array.isArray(rawArgv)
|
||||
? rawArgv.map(rawArgv => rawArgv.replace(/^--?/, ''))
|
||||
: Object.keys(rawArgv)
|
||||
); // strip dashed args
|
||||
|
||||
return Object.keys(argv).reduce((result, key) => {
|
||||
if (!key.includes('-')) {
|
||||
result[key] = argv[key];
|
||||
}
|
||||
|
||||
return result;
|
||||
}, {});
|
||||
};
|
||||
|
||||
exports.buildArgv = buildArgv;
|
||||
|
||||
const getProjectListFromCLIArgs = (argv, project) => {
|
||||
const projects = argv.projects ? argv.projects : [];
|
||||
|
||||
if (project) {
|
||||
projects.push(project);
|
||||
}
|
||||
|
||||
if (!projects.length && process.platform === 'win32') {
|
||||
try {
|
||||
projects.push((0, _realpathNative().sync)(process.cwd()));
|
||||
} catch (err) {
|
||||
// do nothing, just catch error
|
||||
// process.binding('fs').realpath can throw, e.g. on mapped drives
|
||||
}
|
||||
}
|
||||
|
||||
if (!projects.length) {
|
||||
projects.push(process.cwd());
|
||||
}
|
||||
|
||||
return projects;
|
||||
};
|
||||
|
||||
const readResultsAndExit = (result, globalConfig) => {
|
||||
const code = !result || result.success ? 0 : globalConfig.testFailureExitCode; // Only exit if needed
|
||||
|
||||
process.on('exit', () => {
|
||||
if (typeof code === 'number' && code !== 0) {
|
||||
process.exitCode = code;
|
||||
}
|
||||
});
|
||||
|
||||
if (globalConfig.forceExit) {
|
||||
if (!globalConfig.detectOpenHandles) {
|
||||
console.warn(
|
||||
_chalk().default.bold('Force exiting Jest: ') +
|
||||
'Have you considered using `--detectOpenHandles` to detect ' +
|
||||
'async operations that kept running after all tests finished?'
|
||||
);
|
||||
}
|
||||
|
||||
(0, _exit().default)(code);
|
||||
} else if (!globalConfig.detectOpenHandles) {
|
||||
setTimeout(() => {
|
||||
console.warn(
|
||||
_chalk().default.yellow.bold(
|
||||
'Jest did not exit one second after the test run has completed.\n\n'
|
||||
) +
|
||||
_chalk().default.yellow(
|
||||
'This usually means that there are asynchronous operations that ' +
|
||||
"weren't stopped in your tests. Consider running Jest with " +
|
||||
'`--detectOpenHandles` to troubleshoot this issue.'
|
||||
)
|
||||
);
|
||||
}, 1000).unref();
|
||||
}
|
||||
};
|
108
node_modules/jest/node_modules/jest-cli/build/index.d.ts
generated
vendored
Normal file
108
node_modules/jest/node_modules/jest-cli/build/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,108 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
/// <reference types="yargs" />
|
||||
import { SearchSource, TestScheduler, TestWatcher } from '@jest/core';
|
||||
import { run } from './cli';
|
||||
import { default as getVersion } from './version';
|
||||
declare const _default: {
|
||||
SearchSource: typeof SearchSource;
|
||||
TestScheduler: typeof TestScheduler;
|
||||
TestWatcher: typeof TestWatcher;
|
||||
getVersion: typeof getVersion;
|
||||
run: typeof run;
|
||||
runCLI: (argv: import("yargs").Arguments<Partial<{
|
||||
all: boolean;
|
||||
automock: boolean;
|
||||
bail: number | boolean;
|
||||
browser: boolean;
|
||||
cache: boolean;
|
||||
cacheDirectory: string;
|
||||
changedFilesWithAncestor: boolean;
|
||||
changedSince: string;
|
||||
ci: boolean;
|
||||
clearCache: boolean;
|
||||
clearMocks: boolean;
|
||||
collectCoverage: boolean;
|
||||
collectCoverageFrom: string;
|
||||
collectCoverageOnlyFrom: string[];
|
||||
color: boolean;
|
||||
colors: boolean;
|
||||
config: string;
|
||||
coverage: boolean;
|
||||
coverageDirectory: string;
|
||||
coveragePathIgnorePatterns: string[];
|
||||
coverageReporters: 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;
|
||||
json: boolean;
|
||||
lastCommit: boolean;
|
||||
logHeapUsage: boolean;
|
||||
maxWorkers: number;
|
||||
moduleDirectories: string[];
|
||||
moduleFileExtensions: string[];
|
||||
moduleNameMapper: string;
|
||||
modulePathIgnorePatterns: string[];
|
||||
modulePaths: string[];
|
||||
noStackTrace: boolean;
|
||||
notify: boolean;
|
||||
notifyMode: string;
|
||||
onlyChanged: boolean;
|
||||
outputFile: string;
|
||||
preset: string | null | undefined;
|
||||
projects: string[];
|
||||
prettierPath: string | null | undefined;
|
||||
resetMocks: boolean;
|
||||
resetModules: boolean;
|
||||
resolver: string | null | undefined;
|
||||
restoreMocks: boolean;
|
||||
rootDir: string;
|
||||
roots: string[];
|
||||
runInBand: boolean;
|
||||
setupFiles: string[];
|
||||
setupFilesAfterEnv: string[];
|
||||
showConfig: boolean;
|
||||
silent: boolean;
|
||||
snapshotSerializers: string[];
|
||||
testEnvironment: string;
|
||||
testFailureExitCode: string | null | undefined;
|
||||
testMatch: string[];
|
||||
testNamePattern: string;
|
||||
testPathIgnorePatterns: string[];
|
||||
testPathPattern: string[];
|
||||
testRegex: string | string[];
|
||||
testResultsProcessor: string | null | undefined;
|
||||
testRunner: string;
|
||||
testSequencer: string;
|
||||
testURL: string;
|
||||
timers: string;
|
||||
transform: string;
|
||||
transformIgnorePatterns: string[];
|
||||
unmockedModulePathPatterns: string[] | null | undefined;
|
||||
updateSnapshot: boolean;
|
||||
useStderr: boolean;
|
||||
verbose: boolean | null | undefined;
|
||||
version: boolean;
|
||||
watch: boolean;
|
||||
watchAll: boolean;
|
||||
watchman: boolean;
|
||||
watchPathIgnorePatterns: string[];
|
||||
}>>, projects: string[]) => Promise<{
|
||||
results: import("@jest/test-result").AggregatedResult;
|
||||
globalConfig: import("@jest/types/build/Config").GlobalConfig;
|
||||
}>;
|
||||
};
|
||||
export = _default;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/jest/node_modules/jest-cli/build/index.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/index.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAS,YAAY,EAAE,aAAa,EAAE,WAAW,EAAC,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhD,kBAOE"}
|
35
node_modules/jest/node_modules/jest-cli/build/index.js
generated
vendored
Normal file
35
node_modules/jest/node_modules/jest-cli/build/index.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
'use strict';
|
||||
|
||||
function _core() {
|
||||
const data = require('@jest/core');
|
||||
|
||||
_core = function _core() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _cli = require('./cli');
|
||||
|
||||
var _version = _interopRequireDefault(require('./version'));
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
// TODO: remove @jest/core exports for the next major
|
||||
module.exports = {
|
||||
SearchSource: _core().SearchSource,
|
||||
TestScheduler: _core().TestScheduler,
|
||||
TestWatcher: _core().TestWatcher,
|
||||
getVersion: _version.default,
|
||||
run: _cli.run,
|
||||
runCLI: _core().runCLI
|
||||
};
|
9
node_modules/jest/node_modules/jest-cli/build/init/constants.d.ts
generated
vendored
Normal file
9
node_modules/jest/node_modules/jest-cli/build/init/constants.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.
|
||||
*/
|
||||
export declare const PACKAGE_JSON = "package.json";
|
||||
export declare const JEST_CONFIG = "jest.config.js";
|
||||
//# sourceMappingURL=constants.d.ts.map
|
1
node_modules/jest/node_modules/jest-cli/build/init/constants.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/init/constants.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/init/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,WAAW,mBAAmB,CAAC"}
|
17
node_modules/jest/node_modules/jest-cli/build/init/constants.js
generated
vendored
Normal file
17
node_modules/jest/node_modules/jest-cli/build/init/constants.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.JEST_CONFIG = exports.PACKAGE_JSON = 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 PACKAGE_JSON = 'package.json';
|
||||
exports.PACKAGE_JSON = PACKAGE_JSON;
|
||||
const JEST_CONFIG = 'jest.config.js';
|
||||
exports.JEST_CONFIG = JEST_CONFIG;
|
13
node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts
generated
vendored
Normal file
13
node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* 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 class NotFoundPackageJsonError extends Error {
|
||||
constructor(rootDir: string);
|
||||
}
|
||||
export declare class MalformedPackageJsonError extends Error {
|
||||
constructor(packageJsonPath: string);
|
||||
}
|
||||
//# sourceMappingURL=errors.d.ts.map
|
1
node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/init/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAK5B;AAED,qBAAa,yBAA0B,SAAQ,KAAK;gBACtC,eAAe,EAAE,MAAM;CAQpC"}
|
35
node_modules/jest/node_modules/jest-cli/build/init/errors.js
generated
vendored
Normal file
35
node_modules/jest/node_modules/jest-cli/build/init/errors.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.MalformedPackageJsonError = exports.NotFoundPackageJsonError = 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.
|
||||
*/
|
||||
class NotFoundPackageJsonError extends Error {
|
||||
constructor(rootDir) {
|
||||
super(`Could not find a "package.json" file in ${rootDir}`);
|
||||
this.name = '';
|
||||
Error.captureStackTrace(this, () => {});
|
||||
}
|
||||
}
|
||||
|
||||
exports.NotFoundPackageJsonError = NotFoundPackageJsonError;
|
||||
|
||||
class MalformedPackageJsonError extends Error {
|
||||
constructor(packageJsonPath) {
|
||||
super(
|
||||
`There is malformed json in ${packageJsonPath}\n` +
|
||||
'Fix it, and then run "jest --init"'
|
||||
);
|
||||
this.name = '';
|
||||
Error.captureStackTrace(this, () => {});
|
||||
}
|
||||
}
|
||||
|
||||
exports.MalformedPackageJsonError = MalformedPackageJsonError;
|
11
node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts
generated
vendored
Normal file
11
node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
declare const generateConfigFile: (results: {
|
||||
[key: string]: unknown;
|
||||
}) => string;
|
||||
export default generateConfigFile;
|
||||
//# sourceMappingURL=generate_config_file.d.ts.map
|
1
node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"generate_config_file.d.ts","sourceRoot":"","sources":["../../src/init/generate_config_file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4BH,QAAA,MAAM,kBAAkB;;YAgDvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
89
node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.js
generated
vendored
Normal file
89
node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.js
generated
vendored
Normal file
|
@ -0,0 +1,89 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestConfig() {
|
||||
const data = require('jest-config');
|
||||
|
||||
_jestConfig = function _jestConfig() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 stringifyOption = (option, map, linePrefix = '') => {
|
||||
const optionDescription = ` // ${_jestConfig().descriptions[option]}`;
|
||||
const stringifiedObject = `${option}: ${JSON.stringify(
|
||||
map[option],
|
||||
null,
|
||||
2
|
||||
)}`;
|
||||
return (
|
||||
optionDescription +
|
||||
'\n' +
|
||||
stringifiedObject
|
||||
.split('\n')
|
||||
.map(line => ' ' + linePrefix + line)
|
||||
.join('\n') +
|
||||
',\n'
|
||||
);
|
||||
};
|
||||
|
||||
const generateConfigFile = results => {
|
||||
const coverage = results.coverage,
|
||||
clearMocks = results.clearMocks,
|
||||
environment = results.environment;
|
||||
const overrides = {};
|
||||
|
||||
if (coverage) {
|
||||
Object.assign(overrides, {
|
||||
coverageDirectory: 'coverage'
|
||||
});
|
||||
}
|
||||
|
||||
if (environment === 'node') {
|
||||
Object.assign(overrides, {
|
||||
testEnvironment: 'node'
|
||||
});
|
||||
}
|
||||
|
||||
if (clearMocks) {
|
||||
Object.assign(overrides, {
|
||||
clearMocks: true
|
||||
});
|
||||
}
|
||||
|
||||
const overrideKeys = Object.keys(overrides);
|
||||
const properties = [];
|
||||
|
||||
for (const option in _jestConfig().descriptions) {
|
||||
const opt = option;
|
||||
|
||||
if (overrideKeys.includes(opt)) {
|
||||
properties.push(stringifyOption(opt, overrides));
|
||||
} else {
|
||||
properties.push(stringifyOption(opt, _jestConfig().defaults, '// '));
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
'// For a detailed explanation regarding each configuration property, visit:\n' +
|
||||
'// https://jestjs.io/docs/en/configuration.html\n\n' +
|
||||
'module.exports = {\n' +
|
||||
properties.join('\n') +
|
||||
'};\n'
|
||||
);
|
||||
};
|
||||
|
||||
var _default = generateConfigFile;
|
||||
exports.default = _default;
|
9
node_modules/jest/node_modules/jest-cli/build/init/index.d.ts
generated
vendored
Normal file
9
node_modules/jest/node_modules/jest-cli/build/init/index.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.
|
||||
*/
|
||||
declare const _default: (rootDir?: string) => Promise<void>;
|
||||
export default _default;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/jest/node_modules/jest-cli/build/init/index.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/init/index.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/init/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAqBH,wBAmGE"}
|
255
node_modules/jest/node_modules/jest-cli/build/init/index.js
generated
vendored
Normal file
255
node_modules/jest/node_modules/jest-cli/build/init/index.js
generated
vendored
Normal file
|
@ -0,0 +1,255 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _fs() {
|
||||
const data = _interopRequireDefault(require('fs'));
|
||||
|
||||
_fs = function _fs() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require('path'));
|
||||
|
||||
_path = function _path() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _prompts() {
|
||||
const data = _interopRequireDefault(require('prompts'));
|
||||
|
||||
_prompts = function _prompts() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _realpathNative() {
|
||||
const data = require('realpath-native');
|
||||
|
||||
_realpathNative = function _realpathNative() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _questions = _interopRequireWildcard(require('./questions'));
|
||||
|
||||
var _errors = require('./errors');
|
||||
|
||||
var _constants = require('./constants');
|
||||
|
||||
var _generate_config_file = _interopRequireDefault(
|
||||
require('./generate_config_file')
|
||||
);
|
||||
|
||||
var _modify_package_json = _interopRequireDefault(
|
||||
require('./modify_package_json')
|
||||
);
|
||||
|
||||
function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for (var key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc =
|
||||
Object.defineProperty && Object.getOwnPropertyDescriptor
|
||||
? Object.getOwnPropertyDescriptor(obj, key)
|
||||
: {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
newObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
newObj.default = obj;
|
||||
return newObj;
|
||||
}
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
||||
try {
|
||||
var info = gen[key](arg);
|
||||
var value = info.value;
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
if (info.done) {
|
||||
resolve(value);
|
||||
} else {
|
||||
Promise.resolve(value).then(_next, _throw);
|
||||
}
|
||||
}
|
||||
|
||||
function _asyncToGenerator(fn) {
|
||||
return function() {
|
||||
var self = this,
|
||||
args = arguments;
|
||||
return new Promise(function(resolve, reject) {
|
||||
var gen = fn.apply(self, args);
|
||||
function _next(value) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value);
|
||||
}
|
||||
function _throw(err) {
|
||||
asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err);
|
||||
}
|
||||
_next(undefined);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
var _default =
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _ref = _asyncToGenerator(function*(
|
||||
rootDir = (0, _realpathNative().sync)(process.cwd())
|
||||
) {
|
||||
// prerequisite checks
|
||||
const projectPackageJsonPath = _path().default.join(
|
||||
rootDir,
|
||||
_constants.PACKAGE_JSON
|
||||
);
|
||||
|
||||
const jestConfigPath = _path().default.join(
|
||||
rootDir,
|
||||
_constants.JEST_CONFIG
|
||||
);
|
||||
|
||||
if (!_fs().default.existsSync(projectPackageJsonPath)) {
|
||||
throw new _errors.NotFoundPackageJsonError(rootDir);
|
||||
}
|
||||
|
||||
const questions = _questions.default.slice(0);
|
||||
|
||||
let hasJestProperty = false;
|
||||
let hasJestConfig = false;
|
||||
let projectPackageJson;
|
||||
|
||||
try {
|
||||
projectPackageJson = JSON.parse(
|
||||
_fs().default.readFileSync(projectPackageJsonPath, 'utf-8')
|
||||
);
|
||||
} catch (error) {
|
||||
throw new _errors.MalformedPackageJsonError(projectPackageJsonPath);
|
||||
}
|
||||
|
||||
if (projectPackageJson.jest) {
|
||||
hasJestProperty = true;
|
||||
}
|
||||
|
||||
if (_fs().default.existsSync(jestConfigPath)) {
|
||||
hasJestConfig = true;
|
||||
}
|
||||
|
||||
if (hasJestProperty || hasJestConfig) {
|
||||
const result = yield (0, _prompts().default)({
|
||||
initial: true,
|
||||
message:
|
||||
'It seems that you already have a jest configuration, do you want to override it?',
|
||||
name: 'continue',
|
||||
type: 'confirm'
|
||||
});
|
||||
|
||||
if (!result.continue) {
|
||||
console.log();
|
||||
console.log('Aborting...');
|
||||
return;
|
||||
}
|
||||
} // Add test script installation only if needed
|
||||
|
||||
if (
|
||||
!projectPackageJson.scripts ||
|
||||
projectPackageJson.scripts.test !== 'jest'
|
||||
) {
|
||||
questions.unshift(_questions.testScriptQuestion);
|
||||
} // Start the init process
|
||||
|
||||
console.log();
|
||||
console.log(
|
||||
_chalk().default.underline(
|
||||
`The following questions will help Jest to create a suitable configuration for your project\n`
|
||||
)
|
||||
);
|
||||
let promptAborted = false; // @ts-ignore: Return type cannot be object - faulty typings
|
||||
|
||||
const results = yield (0, _prompts().default)(questions, {
|
||||
onCancel: () => {
|
||||
promptAborted = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (promptAborted) {
|
||||
console.log();
|
||||
console.log('Aborting...');
|
||||
return;
|
||||
}
|
||||
|
||||
const shouldModifyScripts = results.scripts;
|
||||
|
||||
if (shouldModifyScripts || hasJestProperty) {
|
||||
const modifiedPackageJson = (0, _modify_package_json.default)({
|
||||
projectPackageJson,
|
||||
shouldModifyScripts
|
||||
});
|
||||
|
||||
_fs().default.writeFileSync(
|
||||
projectPackageJsonPath,
|
||||
modifiedPackageJson
|
||||
);
|
||||
|
||||
console.log('');
|
||||
console.log(
|
||||
`✏️ Modified ${_chalk().default.cyan(projectPackageJsonPath)}`
|
||||
);
|
||||
}
|
||||
|
||||
const generatedConfig = (0, _generate_config_file.default)(results);
|
||||
|
||||
_fs().default.writeFileSync(jestConfigPath, generatedConfig);
|
||||
|
||||
console.log('');
|
||||
console.log(
|
||||
`📝 Configuration file created at ${_chalk().default.cyan(
|
||||
jestConfigPath
|
||||
)}`
|
||||
);
|
||||
});
|
||||
|
||||
return function() {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
exports.default = _default;
|
13
node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts
generated
vendored
Normal file
13
node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* 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 { ProjectPackageJson } from './types';
|
||||
declare const modifyPackageJson: ({ projectPackageJson, shouldModifyScripts, }: {
|
||||
projectPackageJson: ProjectPackageJson;
|
||||
shouldModifyScripts: boolean;
|
||||
}) => string;
|
||||
export default modifyPackageJson;
|
||||
//# sourceMappingURL=modify_package_json.d.ts.map
|
1
node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"modify_package_json.d.ts","sourceRoot":"","sources":["../../src/init/modify_package_json.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAE3C,QAAA,MAAM,iBAAiB;;;YAgBtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
28
node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.js
generated
vendored
Normal file
28
node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = 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 modifyPackageJson = ({projectPackageJson, shouldModifyScripts}) => {
|
||||
if (shouldModifyScripts) {
|
||||
projectPackageJson.scripts
|
||||
? (projectPackageJson.scripts.test = 'jest')
|
||||
: (projectPackageJson.scripts = {
|
||||
test: 'jest'
|
||||
});
|
||||
}
|
||||
|
||||
delete projectPackageJson.jest;
|
||||
return JSON.stringify(projectPackageJson, null, 2) + '\n';
|
||||
};
|
||||
|
||||
var _default = modifyPackageJson;
|
||||
exports.default = _default;
|
11
node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts
generated
vendored
Normal file
11
node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* 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 { PromptObject } from 'prompts';
|
||||
declare const defaultQuestions: Array<PromptObject>;
|
||||
export default defaultQuestions;
|
||||
export declare const testScriptQuestion: PromptObject;
|
||||
//# sourceMappingURL=questions.d.ts.map
|
1
node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../src/init/questions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAErC,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,YAAY,CAuBzC,CAAC;AAEF,eAAe,gBAAgB,CAAC;AAEhC,eAAO,MAAM,kBAAkB,EAAE,YAMhC,CAAC"}
|
53
node_modules/jest/node_modules/jest-cli/build/init/questions.js
generated
vendored
Normal file
53
node_modules/jest/node_modules/jest-cli/build/init/questions.js
generated
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.testScriptQuestion = exports.default = 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 defaultQuestions = [
|
||||
{
|
||||
choices: [
|
||||
{
|
||||
title: 'node',
|
||||
value: 'node'
|
||||
},
|
||||
{
|
||||
title: 'jsdom (browser-like)',
|
||||
value: 'jsdom'
|
||||
}
|
||||
],
|
||||
initial: 0,
|
||||
message: 'Choose the test environment that will be used for testing',
|
||||
name: 'environment',
|
||||
type: 'select'
|
||||
},
|
||||
{
|
||||
initial: false,
|
||||
message: 'Do you want Jest to add coverage reports?',
|
||||
name: 'coverage',
|
||||
type: 'confirm'
|
||||
},
|
||||
{
|
||||
initial: false,
|
||||
message: 'Automatically clear mock calls and instances between every test?',
|
||||
name: 'clearMocks',
|
||||
type: 'confirm'
|
||||
}
|
||||
];
|
||||
var _default = defaultQuestions;
|
||||
exports.default = _default;
|
||||
const testScriptQuestion = {
|
||||
initial: true,
|
||||
message:
|
||||
'Would you like to use Jest when running "test" script in "package.json"?',
|
||||
name: 'scripts',
|
||||
type: 'confirm'
|
||||
};
|
||||
exports.testScriptQuestion = testScriptQuestion;
|
14
node_modules/jest/node_modules/jest-cli/build/init/types.d.ts
generated
vendored
Normal file
14
node_modules/jest/node_modules/jest-cli/build/init/types.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* 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 { Config } from '@jest/types';
|
||||
export declare type ProjectPackageJson = {
|
||||
jest?: Partial<Config.InitialOptions>;
|
||||
scripts?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
};
|
||||
//# sourceMappingURL=types.d.ts.map
|
1
node_modules/jest/node_modules/jest-cli/build/init/types.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/init/types.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/init/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAC;CACnC,CAAC"}
|
1
node_modules/jest/node_modules/jest-cli/build/init/types.js
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/init/types.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
'use strict';
|
8
node_modules/jest/node_modules/jest-cli/build/version.d.ts
generated
vendored
Normal file
8
node_modules/jest/node_modules/jest-cli/build/version.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.
|
||||
*/
|
||||
export default function getVersion(): string;
|
||||
//# sourceMappingURL=version.d.ts.map
|
1
node_modules/jest/node_modules/jest-cli/build/version.d.ts.map
generated
vendored
Normal file
1
node_modules/jest/node_modules/jest-cli/build/version.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,OAAO,UAAU,UAAU,IAAI,MAAM,CAE3C"}
|
19
node_modules/jest/node_modules/jest-cli/build/version.js
generated
vendored
Normal file
19
node_modules/jest/node_modules/jest-cli/build/version.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = getVersion;
|
||||
|
||||
/**
|
||||
* 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 _require = require('../package.json'),
|
||||
VERSION = _require.version;
|
||||
|
||||
function getVersion() {
|
||||
return VERSION;
|
||||
}
|
103
node_modules/jest/node_modules/jest-cli/package.json
generated
vendored
Normal file
103
node_modules/jest/node_modules/jest-cli/package.json
generated
vendored
Normal file
|
@ -0,0 +1,103 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"jest-cli@24.8.0",
|
||||
"/Users/eric/repos/actions/setup-node"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "jest-cli@24.8.0",
|
||||
"_id": "jest-cli@24.8.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-+p6J00jSMPQ116ZLlHJJvdf8wbjNbZdeSX9ptfHX06/MSNaXmKihQzx5vQcw0q2G6JsdVkUIdWbOWtSnaYs3yA==",
|
||||
"_location": "/jest/jest-cli",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "jest-cli@24.8.0",
|
||||
"name": "jest-cli",
|
||||
"escapedName": "jest-cli",
|
||||
"rawSpec": "24.8.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "24.8.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/jest"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.8.0.tgz",
|
||||
"_spec": "24.8.0",
|
||||
"_where": "/Users/eric/repos/actions/setup-node",
|
||||
"bin": {
|
||||
"jest": "./bin/jest.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/facebook/jest/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jest/core": "^24.8.0",
|
||||
"@jest/test-result": "^24.8.0",
|
||||
"@jest/types": "^24.8.0",
|
||||
"chalk": "^2.0.1",
|
||||
"exit": "^0.1.2",
|
||||
"import-local": "^2.0.0",
|
||||
"is-ci": "^2.0.0",
|
||||
"jest-config": "^24.8.0",
|
||||
"jest-util": "^24.8.0",
|
||||
"jest-validate": "^24.8.0",
|
||||
"prompts": "^2.0.1",
|
||||
"realpath-native": "^1.1.0",
|
||||
"yargs": "^12.0.2"
|
||||
},
|
||||
"description": "Delightful JavaScript Testing.",
|
||||
"devDependencies": {
|
||||
"@types/exit": "^0.1.30",
|
||||
"@types/is-ci": "^1.1.0",
|
||||
"@types/prompts": "^1.2.0",
|
||||
"@types/yargs": "^12.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
},
|
||||
"gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4",
|
||||
"homepage": "https://jestjs.io/",
|
||||
"keywords": [
|
||||
"ava",
|
||||
"babel",
|
||||
"coverage",
|
||||
"easy",
|
||||
"expect",
|
||||
"facebook",
|
||||
"immersive",
|
||||
"instant",
|
||||
"jasmine",
|
||||
"jest",
|
||||
"jsdom",
|
||||
"mocha",
|
||||
"mocking",
|
||||
"painless",
|
||||
"qunit",
|
||||
"runner",
|
||||
"sandboxed",
|
||||
"snapshot",
|
||||
"tap",
|
||||
"tape",
|
||||
"test",
|
||||
"testing",
|
||||
"typescript",
|
||||
"watch"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "build/index.js",
|
||||
"name": "jest-cli",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/facebook/jest.git",
|
||||
"directory": "packages/jest-cli"
|
||||
},
|
||||
"types": "build/index.d.ts",
|
||||
"version": "24.8.0"
|
||||
}
|
15
node_modules/jest/node_modules/jest-cli/tsconfig.json
generated
vendored
Normal file
15
node_modules/jest/node_modules/jest-cli/tsconfig.json
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "build"
|
||||
},
|
||||
"references": [
|
||||
{"path": "../jest-core"},
|
||||
{"path": "../jest-config"},
|
||||
{"path": "../jest-test-result"},
|
||||
{"path": "../jest-types"},
|
||||
{"path": "../jest-util"},
|
||||
{"path": "../jest-validate"}
|
||||
]
|
||||
}
|
99
node_modules/jest/package.json
generated
vendored
Normal file
99
node_modules/jest/package.json
generated
vendored
Normal file
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"jest@24.8.0",
|
||||
"/Users/eric/repos/actions/setup-node"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "jest@24.8.0",
|
||||
"_id": "jest@24.8.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-o0HM90RKFRNWmAWvlyV8i5jGZ97pFwkeVoGvPW1EtLTgJc2+jcuqcbbqcSZLE/3f2S5pt0y2ZBETuhpWNl1Reg==",
|
||||
"_location": "/jest",
|
||||
"_phantomChildren": {
|
||||
"@jest/core": "24.8.0",
|
||||
"@jest/test-result": "24.8.0",
|
||||
"@jest/types": "24.8.0",
|
||||
"chalk": "2.4.2",
|
||||
"exit": "0.1.2",
|
||||
"import-local": "2.0.0",
|
||||
"is-ci": "2.0.0",
|
||||
"jest-config": "24.8.0",
|
||||
"jest-util": "24.8.0",
|
||||
"jest-validate": "24.8.0",
|
||||
"prompts": "2.1.0",
|
||||
"realpath-native": "1.1.0",
|
||||
"yargs": "12.0.5"
|
||||
},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "jest@24.8.0",
|
||||
"name": "jest",
|
||||
"escapedName": "jest",
|
||||
"rawSpec": "24.8.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "24.8.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/jest/-/jest-24.8.0.tgz",
|
||||
"_spec": "24.8.0",
|
||||
"_where": "/Users/eric/repos/actions/setup-node",
|
||||
"bin": {
|
||||
"jest": "./bin/jest.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/facebook/jest/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"import-local": "^2.0.0",
|
||||
"jest-cli": "^24.8.0"
|
||||
},
|
||||
"description": "Delightful JavaScript Testing.",
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
},
|
||||
"gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4",
|
||||
"homepage": "https://jestjs.io/",
|
||||
"keywords": [
|
||||
"ava",
|
||||
"babel",
|
||||
"coverage",
|
||||
"easy",
|
||||
"expect",
|
||||
"facebook",
|
||||
"immersive",
|
||||
"instant",
|
||||
"jasmine",
|
||||
"jest",
|
||||
"jsdom",
|
||||
"mocha",
|
||||
"mocking",
|
||||
"painless",
|
||||
"qunit",
|
||||
"runner",
|
||||
"sandboxed",
|
||||
"snapshot",
|
||||
"tap",
|
||||
"tape",
|
||||
"test",
|
||||
"testing",
|
||||
"typescript",
|
||||
"watch"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "build/jest.js",
|
||||
"name": "jest",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/facebook/jest.git"
|
||||
},
|
||||
"types": "build/jest.d.ts",
|
||||
"version": "24.8.0"
|
||||
}
|
10
node_modules/jest/tsconfig.json
generated
vendored
Normal file
10
node_modules/jest/tsconfig.json
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "build"
|
||||
},
|
||||
"references": [
|
||||
{"path": "../jest-cli"}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue