Add node modules and compiled JavaScript from main
This commit is contained in:
parent
8bccaeaf7c
commit
4181bfdf50
7465 changed files with 1775003 additions and 2 deletions
18
node_modules/@jest/core/build/plugins/Quit.d.ts
generated
vendored
Normal file
18
node_modules/@jest/core/build/plugins/Quit.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* 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="node" />
|
||||
import { BaseWatchPlugin, UsageData } from 'jest-watcher';
|
||||
declare class QuitPlugin extends BaseWatchPlugin {
|
||||
isInternal: true;
|
||||
constructor(options: {
|
||||
stdin: NodeJS.ReadStream;
|
||||
stdout: NodeJS.WriteStream;
|
||||
});
|
||||
run(): Promise<void>;
|
||||
getUsageInfo(): UsageData;
|
||||
}
|
||||
export default QuitPlugin;
|
60
node_modules/@jest/core/build/plugins/Quit.js
generated
vendored
Normal file
60
node_modules/@jest/core/build/plugins/Quit.js
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestWatcher() {
|
||||
const data = require('jest-watcher');
|
||||
|
||||
_jestWatcher = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
class QuitPlugin extends _jestWatcher().BaseWatchPlugin {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
|
||||
_defineProperty(this, 'isInternal', void 0);
|
||||
|
||||
this.isInternal = true;
|
||||
}
|
||||
|
||||
async run() {
|
||||
if (typeof this._stdin.setRawMode === 'function') {
|
||||
this._stdin.setRawMode(false);
|
||||
}
|
||||
|
||||
this._stdout.write('\n');
|
||||
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
getUsageInfo() {
|
||||
return {
|
||||
key: 'q',
|
||||
prompt: 'quit watch mode'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
var _default = QuitPlugin;
|
||||
exports.default = _default;
|
21
node_modules/@jest/core/build/plugins/TestNamePattern.d.ts
generated
vendored
Normal file
21
node_modules/@jest/core/build/plugins/TestNamePattern.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* 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="node" />
|
||||
import type { Config } from '@jest/types';
|
||||
import { BaseWatchPlugin, Prompt, UpdateConfigCallback, UsageData } from 'jest-watcher';
|
||||
declare class TestNamePatternPlugin extends BaseWatchPlugin {
|
||||
_prompt: Prompt;
|
||||
isInternal: true;
|
||||
constructor(options: {
|
||||
stdin: NodeJS.ReadStream;
|
||||
stdout: NodeJS.WriteStream;
|
||||
});
|
||||
getUsageInfo(): UsageData;
|
||||
onKey(key: string): void;
|
||||
run(globalConfig: Config.GlobalConfig, updateConfigAndRun: UpdateConfigCallback): Promise<void>;
|
||||
}
|
||||
export default TestNamePatternPlugin;
|
103
node_modules/@jest/core/build/plugins/TestNamePattern.js
generated
vendored
Normal file
103
node_modules/@jest/core/build/plugins/TestNamePattern.js
generated
vendored
Normal file
|
@ -0,0 +1,103 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestWatcher() {
|
||||
const data = require('jest-watcher');
|
||||
|
||||
_jestWatcher = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _TestNamePatternPrompt() {
|
||||
const data = _interopRequireDefault(require('../TestNamePatternPrompt'));
|
||||
|
||||
_TestNamePatternPrompt = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _activeFiltersMessage() {
|
||||
const data = _interopRequireDefault(require('../lib/activeFiltersMessage'));
|
||||
|
||||
_activeFiltersMessage = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
class TestNamePatternPlugin extends _jestWatcher().BaseWatchPlugin {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
|
||||
_defineProperty(this, '_prompt', void 0);
|
||||
|
||||
_defineProperty(this, 'isInternal', void 0);
|
||||
|
||||
this._prompt = new (_jestWatcher().Prompt)();
|
||||
this.isInternal = true;
|
||||
}
|
||||
|
||||
getUsageInfo() {
|
||||
return {
|
||||
key: 't',
|
||||
prompt: 'filter by a test name regex pattern'
|
||||
};
|
||||
}
|
||||
|
||||
onKey(key) {
|
||||
this._prompt.put(key);
|
||||
}
|
||||
|
||||
run(globalConfig, updateConfigAndRun) {
|
||||
return new Promise((res, rej) => {
|
||||
const testNamePatternPrompt = new (_TestNamePatternPrompt().default)(
|
||||
this._stdout,
|
||||
this._prompt
|
||||
);
|
||||
testNamePatternPrompt.run(
|
||||
value => {
|
||||
updateConfigAndRun({
|
||||
mode: 'watch',
|
||||
testNamePattern: value
|
||||
});
|
||||
res();
|
||||
},
|
||||
rej,
|
||||
{
|
||||
header: (0, _activeFiltersMessage().default)(globalConfig)
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var _default = TestNamePatternPlugin;
|
||||
exports.default = _default;
|
21
node_modules/@jest/core/build/plugins/TestPathPattern.d.ts
generated
vendored
Normal file
21
node_modules/@jest/core/build/plugins/TestPathPattern.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* 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="node" />
|
||||
import type { Config } from '@jest/types';
|
||||
import { BaseWatchPlugin, UpdateConfigCallback, UsageData } from 'jest-watcher';
|
||||
declare class TestPathPatternPlugin extends BaseWatchPlugin {
|
||||
private _prompt;
|
||||
isInternal: true;
|
||||
constructor(options: {
|
||||
stdin: NodeJS.ReadStream;
|
||||
stdout: NodeJS.WriteStream;
|
||||
});
|
||||
getUsageInfo(): UsageData;
|
||||
onKey(key: string): void;
|
||||
run(globalConfig: Config.GlobalConfig, updateConfigAndRun: UpdateConfigCallback): Promise<void>;
|
||||
}
|
||||
export default TestPathPatternPlugin;
|
103
node_modules/@jest/core/build/plugins/TestPathPattern.js
generated
vendored
Normal file
103
node_modules/@jest/core/build/plugins/TestPathPattern.js
generated
vendored
Normal file
|
@ -0,0 +1,103 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestWatcher() {
|
||||
const data = require('jest-watcher');
|
||||
|
||||
_jestWatcher = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _TestPathPatternPrompt() {
|
||||
const data = _interopRequireDefault(require('../TestPathPatternPrompt'));
|
||||
|
||||
_TestPathPatternPrompt = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _activeFiltersMessage() {
|
||||
const data = _interopRequireDefault(require('../lib/activeFiltersMessage'));
|
||||
|
||||
_activeFiltersMessage = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
class TestPathPatternPlugin extends _jestWatcher().BaseWatchPlugin {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
|
||||
_defineProperty(this, '_prompt', void 0);
|
||||
|
||||
_defineProperty(this, 'isInternal', void 0);
|
||||
|
||||
this._prompt = new (_jestWatcher().Prompt)();
|
||||
this.isInternal = true;
|
||||
}
|
||||
|
||||
getUsageInfo() {
|
||||
return {
|
||||
key: 'p',
|
||||
prompt: 'filter by a filename regex pattern'
|
||||
};
|
||||
}
|
||||
|
||||
onKey(key) {
|
||||
this._prompt.put(key);
|
||||
}
|
||||
|
||||
run(globalConfig, updateConfigAndRun) {
|
||||
return new Promise((res, rej) => {
|
||||
const testPathPatternPrompt = new (_TestPathPatternPrompt().default)(
|
||||
this._stdout,
|
||||
this._prompt
|
||||
);
|
||||
testPathPatternPrompt.run(
|
||||
value => {
|
||||
updateConfigAndRun({
|
||||
mode: 'watch',
|
||||
testPathPattern: value
|
||||
});
|
||||
res();
|
||||
},
|
||||
rej,
|
||||
{
|
||||
header: (0, _activeFiltersMessage().default)(globalConfig)
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var _default = TestPathPatternPlugin;
|
||||
exports.default = _default;
|
21
node_modules/@jest/core/build/plugins/UpdateSnapshots.d.ts
generated
vendored
Normal file
21
node_modules/@jest/core/build/plugins/UpdateSnapshots.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* 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="node" />
|
||||
import type { Config } from '@jest/types';
|
||||
import { BaseWatchPlugin, JestHookSubscriber, UpdateConfigCallback, UsageData } from 'jest-watcher';
|
||||
declare class UpdateSnapshotsPlugin extends BaseWatchPlugin {
|
||||
private _hasSnapshotFailure;
|
||||
isInternal: true;
|
||||
constructor(options: {
|
||||
stdin: NodeJS.ReadStream;
|
||||
stdout: NodeJS.WriteStream;
|
||||
});
|
||||
run(_globalConfig: Config.GlobalConfig, updateConfigAndRun: UpdateConfigCallback): Promise<boolean>;
|
||||
apply(hooks: JestHookSubscriber): void;
|
||||
getUsageInfo(): UsageData | null;
|
||||
}
|
||||
export default UpdateSnapshotsPlugin;
|
70
node_modules/@jest/core/build/plugins/UpdateSnapshots.js
generated
vendored
Normal file
70
node_modules/@jest/core/build/plugins/UpdateSnapshots.js
generated
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestWatcher() {
|
||||
const data = require('jest-watcher');
|
||||
|
||||
_jestWatcher = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
class UpdateSnapshotsPlugin extends _jestWatcher().BaseWatchPlugin {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
|
||||
_defineProperty(this, '_hasSnapshotFailure', void 0);
|
||||
|
||||
_defineProperty(this, 'isInternal', void 0);
|
||||
|
||||
this.isInternal = true;
|
||||
this._hasSnapshotFailure = false;
|
||||
}
|
||||
|
||||
run(_globalConfig, updateConfigAndRun) {
|
||||
updateConfigAndRun({
|
||||
updateSnapshot: 'all'
|
||||
});
|
||||
return Promise.resolve(false);
|
||||
}
|
||||
|
||||
apply(hooks) {
|
||||
hooks.onTestRunComplete(results => {
|
||||
this._hasSnapshotFailure = results.snapshot.failure;
|
||||
});
|
||||
}
|
||||
|
||||
getUsageInfo() {
|
||||
if (this._hasSnapshotFailure) {
|
||||
return {
|
||||
key: 'u',
|
||||
prompt: 'update failing snapshots'
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
var _default = UpdateSnapshotsPlugin;
|
||||
exports.default = _default;
|
20
node_modules/@jest/core/build/plugins/UpdateSnapshotsInteractive.d.ts
generated
vendored
Normal file
20
node_modules/@jest/core/build/plugins/UpdateSnapshotsInteractive.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { AggregatedResult, AssertionLocation } from '@jest/test-result';
|
||||
import type { Config } from '@jest/types';
|
||||
import { BaseWatchPlugin, JestHookSubscriber, UsageData } from 'jest-watcher';
|
||||
declare class UpdateSnapshotInteractivePlugin extends BaseWatchPlugin {
|
||||
private _snapshotInteractiveMode;
|
||||
private _failedSnapshotTestAssertions;
|
||||
isInternal: true;
|
||||
getFailedSnapshotTestAssertions(testResults: AggregatedResult): Array<AssertionLocation>;
|
||||
apply(hooks: JestHookSubscriber): void;
|
||||
onKey(key: string): void;
|
||||
run(_globalConfig: Config.GlobalConfig, updateConfigAndRun: Function): Promise<void>;
|
||||
getUsageInfo(): UsageData | null;
|
||||
}
|
||||
export default UpdateSnapshotInteractivePlugin;
|
145
node_modules/@jest/core/build/plugins/UpdateSnapshotsInteractive.js
generated
vendored
Normal file
145
node_modules/@jest/core/build/plugins/UpdateSnapshotsInteractive.js
generated
vendored
Normal file
|
@ -0,0 +1,145 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestWatcher() {
|
||||
const data = require('jest-watcher');
|
||||
|
||||
_jestWatcher = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _SnapshotInteractiveMode() {
|
||||
const data = _interopRequireDefault(require('../SnapshotInteractiveMode'));
|
||||
|
||||
_SnapshotInteractiveMode = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
class UpdateSnapshotInteractivePlugin extends _jestWatcher().BaseWatchPlugin {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
_defineProperty(
|
||||
this,
|
||||
'_snapshotInteractiveMode',
|
||||
new (_SnapshotInteractiveMode().default)(this._stdout)
|
||||
);
|
||||
|
||||
_defineProperty(this, '_failedSnapshotTestAssertions', []);
|
||||
|
||||
_defineProperty(this, 'isInternal', true);
|
||||
}
|
||||
|
||||
getFailedSnapshotTestAssertions(testResults) {
|
||||
const failedTestPaths = [];
|
||||
|
||||
if (testResults.numFailedTests === 0 || !testResults.testResults) {
|
||||
return failedTestPaths;
|
||||
}
|
||||
|
||||
testResults.testResults.forEach(testResult => {
|
||||
if (testResult.snapshot && testResult.snapshot.unmatched) {
|
||||
testResult.testResults.forEach(result => {
|
||||
if (result.status === 'failed') {
|
||||
failedTestPaths.push({
|
||||
fullName: result.fullName,
|
||||
path: testResult.testFilePath
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return failedTestPaths;
|
||||
}
|
||||
|
||||
apply(hooks) {
|
||||
hooks.onTestRunComplete(results => {
|
||||
this._failedSnapshotTestAssertions = this.getFailedSnapshotTestAssertions(
|
||||
results
|
||||
);
|
||||
|
||||
if (this._snapshotInteractiveMode.isActive()) {
|
||||
this._snapshotInteractiveMode.updateWithResults(results);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onKey(key) {
|
||||
if (this._snapshotInteractiveMode.isActive()) {
|
||||
this._snapshotInteractiveMode.put(key);
|
||||
}
|
||||
}
|
||||
|
||||
run(_globalConfig, updateConfigAndRun) {
|
||||
if (this._failedSnapshotTestAssertions.length) {
|
||||
return new Promise(res => {
|
||||
this._snapshotInteractiveMode.run(
|
||||
this._failedSnapshotTestAssertions,
|
||||
(assertion, shouldUpdateSnapshot) => {
|
||||
updateConfigAndRun({
|
||||
mode: 'watch',
|
||||
testNamePattern: assertion ? `^${assertion.fullName}$` : '',
|
||||
testPathPattern: assertion ? assertion.path : '',
|
||||
updateSnapshot: shouldUpdateSnapshot ? 'all' : 'none'
|
||||
});
|
||||
|
||||
if (!this._snapshotInteractiveMode.isActive()) {
|
||||
res();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
} else {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
getUsageInfo() {
|
||||
var _this$_failedSnapshot;
|
||||
|
||||
if (
|
||||
((_this$_failedSnapshot = this._failedSnapshotTestAssertions) === null ||
|
||||
_this$_failedSnapshot === void 0
|
||||
? void 0
|
||||
: _this$_failedSnapshot.length) > 0
|
||||
) {
|
||||
return {
|
||||
key: 'i',
|
||||
prompt: 'update failing snapshots interactively'
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
var _default = UpdateSnapshotInteractivePlugin;
|
||||
exports.default = _default;
|
Loading…
Add table
Add a link
Reference in a new issue