mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-06-08 09:54:28 +00:00
v5
This commit is contained in:
parent
d1407282e6
commit
08403cd828
6774 changed files with 1602535 additions and 1 deletions
21
node_modules/@jest/console/LICENSE
generated
vendored
Normal file
21
node_modules/@jest/console/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Facebook, Inc. and its affiliates.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
36
node_modules/@jest/console/build/BufferedConsole.d.ts
generated
vendored
Normal file
36
node_modules/@jest/console/build/BufferedConsole.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* 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 { Console } from 'console';
|
||||
import { SourceMapRegistry } from '@jest/source-map';
|
||||
import { ConsoleBuffer, LogMessage, LogType } from './types';
|
||||
export default class BufferedConsole extends Console {
|
||||
private _buffer;
|
||||
private _counters;
|
||||
private _timers;
|
||||
private _groupDepth;
|
||||
private _getSourceMaps;
|
||||
constructor(getSourceMaps: () => SourceMapRegistry | null | undefined);
|
||||
static write(buffer: ConsoleBuffer, type: LogType, message: LogMessage, level?: number | null, sourceMaps?: SourceMapRegistry | null): import("./types").LogEntry[];
|
||||
private _log;
|
||||
assert(value: any, message?: string | Error): void;
|
||||
count(label?: string): void;
|
||||
countReset(label?: string): void;
|
||||
debug(firstArg: any, ...rest: Array<any>): void;
|
||||
dir(firstArg: any, ...rest: Array<any>): void;
|
||||
dirxml(firstArg: any, ...rest: Array<any>): void;
|
||||
error(firstArg: any, ...rest: Array<any>): void;
|
||||
group(title?: string, ...rest: Array<any>): void;
|
||||
groupCollapsed(title?: string, ...rest: Array<any>): void;
|
||||
groupEnd(): void;
|
||||
info(firstArg: any, ...rest: Array<any>): void;
|
||||
log(firstArg: any, ...rest: Array<any>): void;
|
||||
time(label?: string): void;
|
||||
timeEnd(label?: string): void;
|
||||
warn(firstArg: any, ...rest: Array<any>): void;
|
||||
getBuffer(): import("./types").LogEntry[] | undefined;
|
||||
}
|
||||
//# sourceMappingURL=BufferedConsole.d.ts.map
|
1
node_modules/@jest/console/build/BufferedConsole.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/console/build/BufferedConsole.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"BufferedConsole.d.ts","sourceRoot":"","sources":["../src/BufferedConsole.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAGhC,OAAO,EAAc,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAChE,OAAO,EACL,aAAa,EAEb,UAAU,EAEV,OAAO,EACR,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IAClD,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,OAAO,CAAY;IAC3B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,cAAc,CAA6C;gBAEvD,aAAa,EAAE,MAAM,iBAAiB,GAAG,IAAI,GAAG,SAAS;IAgBrE,MAAM,CAAC,KAAK,CACV,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,UAAU,EACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,EACrB,UAAU,CAAC,EAAE,iBAAiB,GAAG,IAAI;IAcvC,OAAO,CAAC,IAAI;IAUZ,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK;IAQ3C,KAAK,CAAC,KAAK,GAAE,MAAkB;IAQ/B,UAAU,CAAC,KAAK,GAAE,MAAkB;IAIpC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIxC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAItC,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIzC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIxC,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAQzC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAQlD,QAAQ;IAMR,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIvC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAItC,IAAI,CAAC,KAAK,GAAE,MAAkB;IAQ9B,OAAO,CAAC,KAAK,GAAE,MAAkB;IAWjC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIvC,SAAS;CAGV"}
|
232
node_modules/@jest/console/build/BufferedConsole.js
generated
vendored
Normal file
232
node_modules/@jest/console/build/BufferedConsole.js
generated
vendored
Normal file
|
@ -0,0 +1,232 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _assert() {
|
||||
const data = _interopRequireDefault(require('assert'));
|
||||
|
||||
_assert = function _assert() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _console() {
|
||||
const data = require('console');
|
||||
|
||||
_console = function _console() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _util() {
|
||||
const data = require('util');
|
||||
|
||||
_util = function _util() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _sourceMap() {
|
||||
const data = require('@jest/source-map');
|
||||
|
||||
_sourceMap = function _sourceMap() {
|
||||
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 BufferedConsole extends _console().Console {
|
||||
constructor(getSourceMaps) {
|
||||
const buffer = [];
|
||||
super({
|
||||
write: message => {
|
||||
BufferedConsole.write(buffer, 'log', message, null, getSourceMaps());
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
_defineProperty(this, '_buffer', void 0);
|
||||
|
||||
_defineProperty(this, '_counters', void 0);
|
||||
|
||||
_defineProperty(this, '_timers', void 0);
|
||||
|
||||
_defineProperty(this, '_groupDepth', void 0);
|
||||
|
||||
_defineProperty(this, '_getSourceMaps', void 0);
|
||||
|
||||
this._getSourceMaps = getSourceMaps;
|
||||
this._buffer = buffer;
|
||||
this._counters = {};
|
||||
this._timers = {};
|
||||
this._groupDepth = 0;
|
||||
}
|
||||
|
||||
static write(buffer, type, message, level, sourceMaps) {
|
||||
const callsite = (0, _sourceMap().getCallsite)(
|
||||
level != null ? level : 2,
|
||||
sourceMaps
|
||||
);
|
||||
const origin = callsite.getFileName() + ':' + callsite.getLineNumber();
|
||||
buffer.push({
|
||||
message,
|
||||
origin,
|
||||
type
|
||||
});
|
||||
return buffer;
|
||||
}
|
||||
|
||||
_log(type, message) {
|
||||
BufferedConsole.write(
|
||||
this._buffer,
|
||||
type,
|
||||
' '.repeat(this._groupDepth) + message,
|
||||
3,
|
||||
this._getSourceMaps()
|
||||
);
|
||||
}
|
||||
|
||||
assert(value, message) {
|
||||
try {
|
||||
(0, _assert().default)(value, message);
|
||||
} catch (error) {
|
||||
this._log('assert', error.toString());
|
||||
}
|
||||
}
|
||||
|
||||
count(label = 'default') {
|
||||
if (!this._counters[label]) {
|
||||
this._counters[label] = 0;
|
||||
}
|
||||
|
||||
this._log(
|
||||
'count',
|
||||
(0, _util().format)(`${label}: ${++this._counters[label]}`)
|
||||
);
|
||||
}
|
||||
|
||||
countReset(label = 'default') {
|
||||
this._counters[label] = 0;
|
||||
}
|
||||
|
||||
debug(firstArg, ...rest) {
|
||||
this._log('debug', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
dir(firstArg, ...rest) {
|
||||
this._log('dir', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
dirxml(firstArg, ...rest) {
|
||||
this._log('dirxml', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
error(firstArg, ...rest) {
|
||||
this._log('error', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
group(title, ...rest) {
|
||||
this._groupDepth++;
|
||||
|
||||
if (title || rest.length > 0) {
|
||||
this._log(
|
||||
'group',
|
||||
_chalk().default.bold((0, _util().format)(title, ...rest))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
groupCollapsed(title, ...rest) {
|
||||
this._groupDepth++;
|
||||
|
||||
if (title || rest.length > 0) {
|
||||
this._log(
|
||||
'groupCollapsed',
|
||||
_chalk().default.bold((0, _util().format)(title, ...rest))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
groupEnd() {
|
||||
if (this._groupDepth > 0) {
|
||||
this._groupDepth--;
|
||||
}
|
||||
}
|
||||
|
||||
info(firstArg, ...rest) {
|
||||
this._log('info', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
log(firstArg, ...rest) {
|
||||
this._log('log', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
time(label = 'default') {
|
||||
if (this._timers[label]) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._timers[label] = new Date();
|
||||
}
|
||||
|
||||
timeEnd(label = 'default') {
|
||||
const startTime = this._timers[label];
|
||||
|
||||
if (startTime) {
|
||||
const endTime = new Date();
|
||||
const time = endTime.getTime() - startTime.getTime();
|
||||
|
||||
this._log('time', (0, _util().format)(`${label}: ${time}ms`));
|
||||
|
||||
delete this._timers[label];
|
||||
}
|
||||
}
|
||||
|
||||
warn(firstArg, ...rest) {
|
||||
this._log('warn', (0, _util().format)(firstArg, ...rest));
|
||||
}
|
||||
|
||||
getBuffer() {
|
||||
return this._buffer.length ? this._buffer : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = BufferedConsole;
|
39
node_modules/@jest/console/build/CustomConsole.d.ts
generated
vendored
Normal file
39
node_modules/@jest/console/build/CustomConsole.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
/**
|
||||
* 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 { Console } from 'console';
|
||||
import { LogMessage, LogType } from './types';
|
||||
declare type Formatter = (type: LogType, message: LogMessage) => string;
|
||||
export default class CustomConsole extends Console {
|
||||
private _stdout;
|
||||
private _stderr;
|
||||
private _formatBuffer;
|
||||
private _counters;
|
||||
private _timers;
|
||||
private _groupDepth;
|
||||
constructor(stdout: NodeJS.WritableStream, stderr: NodeJS.WritableStream, formatBuffer?: Formatter);
|
||||
private _log;
|
||||
private _logError;
|
||||
assert(value: any, message?: string | Error): void;
|
||||
count(label?: string): void;
|
||||
countReset(label?: string): void;
|
||||
debug(firstArg: any, ...args: Array<any>): void;
|
||||
dir(firstArg: any, ...args: Array<any>): void;
|
||||
dirxml(firstArg: any, ...args: Array<any>): void;
|
||||
error(firstArg: any, ...args: Array<any>): void;
|
||||
group(title?: string, ...args: Array<any>): void;
|
||||
groupCollapsed(title?: string, ...args: Array<any>): void;
|
||||
groupEnd(): void;
|
||||
info(firstArg: any, ...args: Array<any>): void;
|
||||
log(firstArg: any, ...args: Array<any>): void;
|
||||
time(label?: string): void;
|
||||
timeEnd(label?: string): void;
|
||||
warn(firstArg: any, ...args: Array<any>): void;
|
||||
getBuffer(): undefined;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=CustomConsole.d.ts.map
|
1
node_modules/@jest/console/build/CustomConsole.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/console/build/CustomConsole.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"CustomConsole.d.ts","sourceRoot":"","sources":["../src/CustomConsole.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAc,UAAU,EAAa,OAAO,EAAC,MAAM,SAAS,CAAC;AASpE,aAAK,SAAS,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,KAAK,MAAM,CAAC;AAEhE,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;IAChD,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,aAAa,CAAY;IACjC,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,OAAO,CAAY;IAC3B,OAAO,CAAC,WAAW,CAAS;gBAG1B,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,YAAY,GAAE,SAAuC;IAWvD,OAAO,CAAC,IAAI;IAOZ,OAAO,CAAC,SAAS;IAOjB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK;IAQ3C,KAAK,CAAC,KAAK,GAAE,MAAkB;IAQ/B,UAAU,CAAC,KAAK,GAAE,MAAkB;IAIpC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIxC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAItC,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIzC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIxC,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAQzC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAQlD,QAAQ;IAMR,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIvC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAItC,IAAI,CAAC,KAAK,GAAE,MAAkB;IAQ9B,OAAO,CAAC,KAAK,GAAE,MAAkB;IAWjC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIvC,SAAS;CAGV"}
|
216
node_modules/@jest/console/build/CustomConsole.js
generated
vendored
Normal file
216
node_modules/@jest/console/build/CustomConsole.js
generated
vendored
Normal file
|
@ -0,0 +1,216 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _assert() {
|
||||
const data = _interopRequireDefault(require('assert'));
|
||||
|
||||
_assert = function _assert() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _util() {
|
||||
const data = require('util');
|
||||
|
||||
_util = function _util() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _console() {
|
||||
const data = require('console');
|
||||
|
||||
_console = function _console() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
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;
|
||||
}
|
||||
|
||||
// TODO: Copied from `jest-util`. Import from it in Jest 25
|
||||
function clearLine(stream) {
|
||||
if (stream.isTTY) {
|
||||
stream.write('\x1b[999D\x1b[K');
|
||||
}
|
||||
}
|
||||
|
||||
class CustomConsole extends _console().Console {
|
||||
constructor(stdout, stderr, formatBuffer = (_type, message) => message) {
|
||||
super(stdout, stderr);
|
||||
|
||||
_defineProperty(this, '_stdout', void 0);
|
||||
|
||||
_defineProperty(this, '_stderr', void 0);
|
||||
|
||||
_defineProperty(this, '_formatBuffer', void 0);
|
||||
|
||||
_defineProperty(this, '_counters', void 0);
|
||||
|
||||
_defineProperty(this, '_timers', void 0);
|
||||
|
||||
_defineProperty(this, '_groupDepth', void 0);
|
||||
|
||||
this._stdout = stdout;
|
||||
this._stderr = stderr;
|
||||
this._formatBuffer = formatBuffer;
|
||||
this._counters = {};
|
||||
this._timers = {};
|
||||
this._groupDepth = 0;
|
||||
}
|
||||
|
||||
_log(type, message) {
|
||||
clearLine(this._stdout);
|
||||
super.log(
|
||||
this._formatBuffer(type, ' '.repeat(this._groupDepth) + message)
|
||||
);
|
||||
}
|
||||
|
||||
_logError(type, message) {
|
||||
clearLine(this._stderr);
|
||||
super.error(
|
||||
this._formatBuffer(type, ' '.repeat(this._groupDepth) + message)
|
||||
);
|
||||
}
|
||||
|
||||
assert(value, message) {
|
||||
try {
|
||||
(0, _assert().default)(value, message);
|
||||
} catch (error) {
|
||||
this._logError('assert', error.toString());
|
||||
}
|
||||
}
|
||||
|
||||
count(label = 'default') {
|
||||
if (!this._counters[label]) {
|
||||
this._counters[label] = 0;
|
||||
}
|
||||
|
||||
this._log(
|
||||
'count',
|
||||
(0, _util().format)(`${label}: ${++this._counters[label]}`)
|
||||
);
|
||||
}
|
||||
|
||||
countReset(label = 'default') {
|
||||
this._counters[label] = 0;
|
||||
}
|
||||
|
||||
debug(firstArg, ...args) {
|
||||
this._log('debug', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
dir(firstArg, ...args) {
|
||||
this._log('dir', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
dirxml(firstArg, ...args) {
|
||||
this._log('dirxml', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
error(firstArg, ...args) {
|
||||
this._logError('error', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
group(title, ...args) {
|
||||
this._groupDepth++;
|
||||
|
||||
if (title || args.length > 0) {
|
||||
this._log(
|
||||
'group',
|
||||
_chalk().default.bold((0, _util().format)(title, ...args))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
groupCollapsed(title, ...args) {
|
||||
this._groupDepth++;
|
||||
|
||||
if (title || args.length > 0) {
|
||||
this._log(
|
||||
'groupCollapsed',
|
||||
_chalk().default.bold((0, _util().format)(title, ...args))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
groupEnd() {
|
||||
if (this._groupDepth > 0) {
|
||||
this._groupDepth--;
|
||||
}
|
||||
}
|
||||
|
||||
info(firstArg, ...args) {
|
||||
this._log('info', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
log(firstArg, ...args) {
|
||||
this._log('log', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
time(label = 'default') {
|
||||
if (this._timers[label]) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._timers[label] = new Date();
|
||||
}
|
||||
|
||||
timeEnd(label = 'default') {
|
||||
const startTime = this._timers[label];
|
||||
|
||||
if (startTime) {
|
||||
const endTime = new Date().getTime();
|
||||
const time = endTime - startTime.getTime();
|
||||
|
||||
this._log('time', (0, _util().format)(`${label}: ${time}ms`));
|
||||
|
||||
delete this._timers[label];
|
||||
}
|
||||
}
|
||||
|
||||
warn(firstArg, ...args) {
|
||||
this._logError('warn', (0, _util().format)(firstArg, ...args));
|
||||
}
|
||||
|
||||
getBuffer() {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = CustomConsole;
|
20
node_modules/@jest/console/build/NullConsole.d.ts
generated
vendored
Normal file
20
node_modules/@jest/console/build/NullConsole.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 CustomConsole from './CustomConsole';
|
||||
export default class NullConsole extends CustomConsole {
|
||||
assert(): void;
|
||||
debug(): void;
|
||||
dir(): void;
|
||||
error(): void;
|
||||
info(): void;
|
||||
log(): void;
|
||||
time(): void;
|
||||
timeEnd(): void;
|
||||
trace(): void;
|
||||
warn(): void;
|
||||
}
|
||||
//# sourceMappingURL=NullConsole.d.ts.map
|
1
node_modules/@jest/console/build/NullConsole.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/console/build/NullConsole.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"NullConsole.d.ts","sourceRoot":"","sources":["../src/NullConsole.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,aAAa;IACpD,MAAM;IACN,KAAK;IACL,GAAG;IACH,KAAK;IACL,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,OAAO;IACP,KAAK;IACL,IAAI;CACL"}
|
42
node_modules/@jest/console/build/NullConsole.js
generated
vendored
Normal file
42
node_modules/@jest/console/build/NullConsole.js
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _CustomConsole = _interopRequireDefault(require('./CustomConsole'));
|
||||
|
||||
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.
|
||||
*/
|
||||
class NullConsole extends _CustomConsole.default {
|
||||
assert() {}
|
||||
|
||||
debug() {}
|
||||
|
||||
dir() {}
|
||||
|
||||
error() {}
|
||||
|
||||
info() {}
|
||||
|
||||
log() {}
|
||||
|
||||
time() {}
|
||||
|
||||
timeEnd() {}
|
||||
|
||||
trace() {}
|
||||
|
||||
warn() {}
|
||||
}
|
||||
|
||||
exports.default = NullConsole;
|
9
node_modules/@jest/console/build/getConsoleOutput.d.ts
generated
vendored
Normal file
9
node_modules/@jest/console/build/getConsoleOutput.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: (root: string, verbose: boolean, buffer: import("./types").LogEntry[]) => string;
|
||||
export default _default;
|
||||
//# sourceMappingURL=getConsoleOutput.d.ts.map
|
1
node_modules/@jest/console/build/getConsoleOutput.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/console/build/getConsoleOutput.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"getConsoleOutput.d.ts","sourceRoot":"","sources":["../src/getConsoleOutput.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAOH,wBA+BE"}
|
80
node_modules/@jest/console/build/getConsoleOutput.js
generated
vendored
Normal file
80
node_modules/@jest/console/build/getConsoleOutput.js
generated
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
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 _slash() {
|
||||
const data = _interopRequireDefault(require('slash'));
|
||||
|
||||
_slash = function _slash() {
|
||||
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.
|
||||
*/
|
||||
var _default = (root, verbose, buffer) => {
|
||||
const TITLE_INDENT = verbose ? ' ' : ' ';
|
||||
const CONSOLE_INDENT = TITLE_INDENT + ' ';
|
||||
return buffer.reduce((output, {type, message, origin}) => {
|
||||
origin = (0, _slash().default)(_path().default.relative(root, origin));
|
||||
message = message
|
||||
.split(/\n/)
|
||||
.map(line => CONSOLE_INDENT + line)
|
||||
.join('\n');
|
||||
let typeMessage = 'console.' + type;
|
||||
|
||||
if (type === 'warn') {
|
||||
message = _chalk().default.yellow(message);
|
||||
typeMessage = _chalk().default.yellow(typeMessage);
|
||||
} else if (type === 'error') {
|
||||
message = _chalk().default.red(message);
|
||||
typeMessage = _chalk().default.red(typeMessage);
|
||||
}
|
||||
|
||||
return (
|
||||
output +
|
||||
TITLE_INDENT +
|
||||
_chalk().default.dim(typeMessage) +
|
||||
' ' +
|
||||
_chalk().default.dim(origin) +
|
||||
'\n' +
|
||||
message +
|
||||
'\n'
|
||||
);
|
||||
}, '');
|
||||
};
|
||||
|
||||
exports.default = _default;
|
12
node_modules/@jest/console/build/index.d.ts
generated
vendored
Normal file
12
node_modules/@jest/console/build/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* 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 as BufferedConsole } from './BufferedConsole';
|
||||
export { default as CustomConsole } from './CustomConsole';
|
||||
export { default as NullConsole } from './NullConsole';
|
||||
export { default as getConsoleOutput } from './getConsoleOutput';
|
||||
export { ConsoleBuffer, LogMessage, LogType } from './types';
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/@jest/console/build/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/console/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;AAEH,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,SAAS,CAAC"}
|
61
node_modules/@jest/console/build/index.js
generated
vendored
Normal file
61
node_modules/@jest/console/build/index.js
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, 'BufferedConsole', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _BufferedConsole.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'CustomConsole', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _CustomConsole.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'NullConsole', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _NullConsole.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'getConsoleOutput', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _getConsoleOutput.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'ConsoleBuffer', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _types.ConsoleBuffer;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'LogMessage', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _types.LogMessage;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'LogType', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _types.LogType;
|
||||
}
|
||||
});
|
||||
|
||||
var _BufferedConsole = _interopRequireDefault(require('./BufferedConsole'));
|
||||
|
||||
var _CustomConsole = _interopRequireDefault(require('./CustomConsole'));
|
||||
|
||||
var _NullConsole = _interopRequireDefault(require('./NullConsole'));
|
||||
|
||||
var _getConsoleOutput = _interopRequireDefault(require('./getConsoleOutput'));
|
||||
|
||||
var _types = require('./types');
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
21
node_modules/@jest/console/build/types.d.ts
generated
vendored
Normal file
21
node_modules/@jest/console/build/types.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.
|
||||
*/
|
||||
export declare type LogMessage = string;
|
||||
export declare type LogEntry = {
|
||||
message: LogMessage;
|
||||
origin: string;
|
||||
type: LogType;
|
||||
};
|
||||
export declare type LogCounters = {
|
||||
[label: string]: number;
|
||||
};
|
||||
export declare type LogTimers = {
|
||||
[label: string]: Date;
|
||||
};
|
||||
export declare type LogType = 'assert' | 'count' | 'debug' | 'dir' | 'dirxml' | 'error' | 'group' | 'groupCollapsed' | 'info' | 'log' | 'time' | 'warn';
|
||||
export declare type ConsoleBuffer = Array<LogEntry>;
|
||||
//# sourceMappingURL=types.d.ts.map
|
1
node_modules/@jest/console/build/types.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/console/build/types.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,UAAU,GAAG,MAAM,CAAC;AAEhC,oBAAY,QAAQ,GAAG;IACrB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,oBAAY,OAAO,GACf,QAAQ,GACR,OAAO,GACP,OAAO,GACP,KAAK,GACL,QAAQ,GACR,OAAO,GACP,OAAO,GACP,gBAAgB,GAChB,MAAM,GACN,KAAK,GACL,MAAM,GACN,MAAM,CAAC;AAEX,oBAAY,aAAa,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC"}
|
1
node_modules/@jest/console/build/types.js
generated
vendored
Normal file
1
node_modules/@jest/console/build/types.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
'use strict';
|
27
node_modules/@jest/console/package.json
generated
vendored
Normal file
27
node_modules/@jest/console/package.json
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "@jest/console",
|
||||
"version": "24.9.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/jest.git",
|
||||
"directory": "packages/jest-console"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
"dependencies": {
|
||||
"@jest/source-map": "^24.9.0",
|
||||
"chalk": "^2.0.1",
|
||||
"slash": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/slash": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1"
|
||||
}
|
3
node_modules/@jest/core/README.md
generated
vendored
Normal file
3
node_modules/@jest/core/README.md
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
# @jest/core
|
||||
|
||||
Jest is currently working on providing a programmatic API. This is under development, and usage of this package directly is currently not supported.
|
16
node_modules/@jest/core/build/FailedTestsCache.d.ts
generated
vendored
Normal file
16
node_modules/@jest/core/build/FailedTestsCache.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* 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 { Test } from 'jest-runner';
|
||||
import { Config } from '@jest/types';
|
||||
import { TestResult } from '@jest/test-result';
|
||||
export default class FailedTestsCache {
|
||||
private _enabledTestsMap?;
|
||||
filterTests(tests: Array<Test>): Array<Test>;
|
||||
setTestResults(testResults: Array<TestResult>): void;
|
||||
updateConfig(globalConfig: Config.GlobalConfig): Config.GlobalConfig;
|
||||
}
|
||||
//# sourceMappingURL=FailedTestsCache.d.ts.map
|
1
node_modules/@jest/core/build/FailedTestsCache.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/FailedTestsCache.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"FailedTestsCache.d.ts","sourceRoot":"","sources":["../src/FailedTestsCache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAI7C,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACnC,OAAO,CAAC,gBAAgB,CAAC,CAAU;IAEnC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;IAS5C,cAAc,CAAC,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC;IAmB7C,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY;CAQrE"}
|
88
node_modules/@jest/core/build/FailedTestsCache.js
generated
vendored
Normal file
88
node_modules/@jest/core/build/FailedTestsCache.js
generated
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 FailedTestsCache {
|
||||
constructor() {
|
||||
_defineProperty(this, '_enabledTestsMap', void 0);
|
||||
}
|
||||
|
||||
filterTests(tests) {
|
||||
const enabledTestsMap = this._enabledTestsMap;
|
||||
|
||||
if (!enabledTestsMap) {
|
||||
return tests;
|
||||
}
|
||||
|
||||
return tests.filter(testResult => enabledTestsMap[testResult.path]);
|
||||
}
|
||||
|
||||
setTestResults(testResults) {
|
||||
this._enabledTestsMap = (testResults || [])
|
||||
.filter(testResult => testResult.numFailingTests)
|
||||
.reduce((suiteMap, testResult) => {
|
||||
suiteMap[testResult.testFilePath] = testResult.testResults
|
||||
.filter(test => test.status === 'failed')
|
||||
.reduce((testMap, test) => {
|
||||
testMap[test.fullName] = true;
|
||||
return testMap;
|
||||
}, {});
|
||||
return suiteMap;
|
||||
}, {});
|
||||
this._enabledTestsMap = Object.freeze(this._enabledTestsMap);
|
||||
}
|
||||
|
||||
updateConfig(globalConfig) {
|
||||
if (!this._enabledTestsMap) {
|
||||
return globalConfig;
|
||||
}
|
||||
|
||||
const newConfig = _objectSpread({}, globalConfig);
|
||||
|
||||
newConfig.enabledTestsMap = this._enabledTestsMap;
|
||||
return Object.freeze(newConfig);
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = FailedTestsCache;
|
23
node_modules/@jest/core/build/ReporterDispatcher.d.ts
generated
vendored
Normal file
23
node_modules/@jest/core/build/ReporterDispatcher.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* 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 { AggregatedResult, TestResult } from '@jest/test-result';
|
||||
import { Test } from 'jest-runner';
|
||||
import { Context } from 'jest-runtime';
|
||||
import { Reporter, ReporterOnStartOptions } from '@jest/reporters';
|
||||
export default class ReporterDispatcher {
|
||||
private _reporters;
|
||||
constructor();
|
||||
register(reporter: Reporter): void;
|
||||
unregister(ReporterClass: Function): void;
|
||||
onTestResult(test: Test, testResult: TestResult, results: AggregatedResult): Promise<void>;
|
||||
onTestStart(test: Test): Promise<void>;
|
||||
onRunStart(results: AggregatedResult, options: ReporterOnStartOptions): Promise<void>;
|
||||
onRunComplete(contexts: Set<Context>, results: AggregatedResult): Promise<void>;
|
||||
getErrors(): Array<Error>;
|
||||
hasErrors(): boolean;
|
||||
}
|
||||
//# sourceMappingURL=ReporterDispatcher.d.ts.map
|
1
node_modules/@jest/core/build/ReporterDispatcher.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/ReporterDispatcher.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ReporterDispatcher.d.ts","sourceRoot":"","sources":["../src/ReporterDispatcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,QAAQ,EAAE,sBAAsB,EAAC,MAAM,iBAAiB,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,OAAO,CAAC,UAAU,CAAkB;;IAMpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAIlC,UAAU,CAAC,aAAa,EAAE,QAAQ;IAM5B,YAAY,CAChB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,gBAAgB;IAarB,WAAW,CAAC,IAAI,EAAE,IAAI;IAMtB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,sBAAsB;IAMrE,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,gBAAgB;IAQrE,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC;IAOzB,SAAS,IAAI,OAAO;CAGrB"}
|
231
node_modules/@jest/core/build/ReporterDispatcher.js
generated
vendored
Normal file
231
node_modules/@jest/core/build/ReporterDispatcher.js
generated
vendored
Normal file
|
@ -0,0 +1,231 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
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 _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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 ReporterDispatcher {
|
||||
constructor() {
|
||||
_defineProperty(this, '_reporters', void 0);
|
||||
|
||||
this._reporters = [];
|
||||
}
|
||||
|
||||
register(reporter) {
|
||||
this._reporters.push(reporter);
|
||||
}
|
||||
|
||||
unregister(ReporterClass) {
|
||||
this._reporters = this._reporters.filter(
|
||||
reporter => !(reporter instanceof ReporterClass)
|
||||
);
|
||||
}
|
||||
|
||||
onTestResult(test, testResult, results) {
|
||||
var _this = this;
|
||||
|
||||
return _asyncToGenerator(function*() {
|
||||
var _iteratorNormalCompletion = true;
|
||||
var _didIteratorError = false;
|
||||
var _iteratorError = undefined;
|
||||
|
||||
try {
|
||||
for (
|
||||
var _iterator = _this._reporters[Symbol.iterator](), _step;
|
||||
!(_iteratorNormalCompletion = (_step = _iterator.next()).done);
|
||||
_iteratorNormalCompletion = true
|
||||
) {
|
||||
const reporter = _step.value;
|
||||
reporter.onTestResult &&
|
||||
(yield reporter.onTestResult(test, testResult, results));
|
||||
} // Release memory if unused later.
|
||||
} catch (err) {
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
||||
_iterator.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError) {
|
||||
throw _iteratorError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
testResult.sourceMaps = undefined;
|
||||
testResult.coverage = undefined;
|
||||
testResult.console = undefined;
|
||||
})();
|
||||
}
|
||||
|
||||
onTestStart(test) {
|
||||
var _this2 = this;
|
||||
|
||||
return _asyncToGenerator(function*() {
|
||||
var _iteratorNormalCompletion2 = true;
|
||||
var _didIteratorError2 = false;
|
||||
var _iteratorError2 = undefined;
|
||||
|
||||
try {
|
||||
for (
|
||||
var _iterator2 = _this2._reporters[Symbol.iterator](), _step2;
|
||||
!(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done);
|
||||
_iteratorNormalCompletion2 = true
|
||||
) {
|
||||
const reporter = _step2.value;
|
||||
reporter.onTestStart && (yield reporter.onTestStart(test));
|
||||
}
|
||||
} catch (err) {
|
||||
_didIteratorError2 = true;
|
||||
_iteratorError2 = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
||||
_iterator2.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError2) {
|
||||
throw _iteratorError2;
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
onRunStart(results, options) {
|
||||
var _this3 = this;
|
||||
|
||||
return _asyncToGenerator(function*() {
|
||||
var _iteratorNormalCompletion3 = true;
|
||||
var _didIteratorError3 = false;
|
||||
var _iteratorError3 = undefined;
|
||||
|
||||
try {
|
||||
for (
|
||||
var _iterator3 = _this3._reporters[Symbol.iterator](), _step3;
|
||||
!(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done);
|
||||
_iteratorNormalCompletion3 = true
|
||||
) {
|
||||
const reporter = _step3.value;
|
||||
reporter.onRunStart && (yield reporter.onRunStart(results, options));
|
||||
}
|
||||
} catch (err) {
|
||||
_didIteratorError3 = true;
|
||||
_iteratorError3 = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
||||
_iterator3.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError3) {
|
||||
throw _iteratorError3;
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
onRunComplete(contexts, results) {
|
||||
var _this4 = this;
|
||||
|
||||
return _asyncToGenerator(function*() {
|
||||
var _iteratorNormalCompletion4 = true;
|
||||
var _didIteratorError4 = false;
|
||||
var _iteratorError4 = undefined;
|
||||
|
||||
try {
|
||||
for (
|
||||
var _iterator4 = _this4._reporters[Symbol.iterator](), _step4;
|
||||
!(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done);
|
||||
_iteratorNormalCompletion4 = true
|
||||
) {
|
||||
const reporter = _step4.value;
|
||||
reporter.onRunComplete &&
|
||||
(yield reporter.onRunComplete(contexts, results));
|
||||
}
|
||||
} catch (err) {
|
||||
_didIteratorError4 = true;
|
||||
_iteratorError4 = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
|
||||
_iterator4.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError4) {
|
||||
throw _iteratorError4;
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
} // Return a list of last errors for every reporter
|
||||
|
||||
getErrors() {
|
||||
return this._reporters.reduce((list, reporter) => {
|
||||
const error = reporter.getLastError && reporter.getLastError();
|
||||
return error ? list.concat(error) : list;
|
||||
}, []);
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
return this.getErrors().length !== 0;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = ReporterDispatcher;
|
43
node_modules/@jest/core/build/SearchSource.d.ts
generated
vendored
Normal file
43
node_modules/@jest/core/build/SearchSource.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
* 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 { Context } from 'jest-runtime';
|
||||
import { Config } from '@jest/types';
|
||||
import { Test } from 'jest-runner';
|
||||
import { ChangedFiles } from 'jest-changed-files';
|
||||
import { Filter, Stats } from './types';
|
||||
export declare type SearchResult = {
|
||||
noSCM?: boolean;
|
||||
stats?: Stats;
|
||||
collectCoverageFrom?: Set<string>;
|
||||
tests: Array<Test>;
|
||||
total?: number;
|
||||
};
|
||||
export declare type TestSelectionConfig = {
|
||||
input?: string;
|
||||
findRelatedTests?: boolean;
|
||||
onlyChanged?: boolean;
|
||||
paths?: Array<Config.Path>;
|
||||
shouldTreatInputAsPattern?: boolean;
|
||||
testPathPattern?: string;
|
||||
watch?: boolean;
|
||||
};
|
||||
export default class SearchSource {
|
||||
private _context;
|
||||
private _testPathCases;
|
||||
constructor(context: Context);
|
||||
private _filterTestPathsWithStats;
|
||||
private _getAllTestPaths;
|
||||
isTestFilePath(path: Config.Path): boolean;
|
||||
findMatchingTests(testPathPattern?: string): SearchResult;
|
||||
findRelatedTests(allPaths: Set<Config.Path>, collectCoverage: boolean): SearchResult;
|
||||
findTestsByPaths(paths: Array<Config.Path>): SearchResult;
|
||||
findRelatedTestsFromPattern(paths: Array<Config.Path>, collectCoverage: boolean): SearchResult;
|
||||
findTestRelatedToChangedFiles(changedFilesInfo: ChangedFiles, collectCoverage: boolean): SearchResult;
|
||||
private _getTestPaths;
|
||||
getTestPaths(globalConfig: Config.GlobalConfig, changedFiles: ChangedFiles | undefined, filter?: Filter): Promise<SearchResult>;
|
||||
}
|
||||
//# sourceMappingURL=SearchSource.d.ts.map
|
1
node_modules/@jest/core/build/SearchSource.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/SearchSource.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"SearchSource.d.ts","sourceRoot":"","sources":["../src/SearchSource.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAMhD,OAAO,EAAgB,MAAM,EAAE,KAAK,EAAC,MAAM,SAAS,CAAC;AAErD,oBAAY,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAClC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAeF,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,cAAc,CAAqB;gBAE/B,OAAO,EAAE,OAAO;IAqC5B,OAAO,CAAC,yBAAyB;IA4CjC,OAAO,CAAC,gBAAgB;IAOxB,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO;IAI1C,iBAAiB,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,YAAY;IAIzD,gBAAgB,CACd,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAC1B,eAAe,EAAE,OAAO,GACvB,YAAY;IA0Df,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,YAAY;IAWzD,2BAA2B,CACzB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EACzB,eAAe,EAAE,OAAO,GACvB,YAAY;IAUf,6BAA6B,CAC3B,gBAAgB,EAAE,YAAY,EAC9B,eAAe,EAAE,OAAO;IAY1B,OAAO,CAAC,aAAa;IA6Bf,YAAY,CAChB,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,YAAY,CAAC;CA4BzB"}
|
425
node_modules/@jest/core/build/SearchSource.js
generated
vendored
Normal file
425
node_modules/@jest/core/build/SearchSource.js
generated
vendored
Normal file
|
@ -0,0 +1,425 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require('path'));
|
||||
|
||||
_path = function _path() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _micromatch() {
|
||||
const data = _interopRequireDefault(require('micromatch'));
|
||||
|
||||
_micromatch = function _micromatch() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestResolveDependencies() {
|
||||
const data = _interopRequireDefault(require('jest-resolve-dependencies'));
|
||||
|
||||
_jestResolveDependencies = function _jestResolveDependencies() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestRegexUtil() {
|
||||
const data = require('jest-regex-util');
|
||||
|
||||
_jestRegexUtil = function _jestRegexUtil() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestConfig() {
|
||||
const data = require('jest-config');
|
||||
|
||||
_jestConfig = function _jestConfig() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestSnapshot() {
|
||||
const data = require('jest-snapshot');
|
||||
|
||||
_jestSnapshot = function _jestSnapshot() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestUtil() {
|
||||
const data = require('jest-util');
|
||||
|
||||
_jestUtil = function _jestUtil() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
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 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 _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;
|
||||
}
|
||||
|
||||
const globsToMatcher = globs => path =>
|
||||
_micromatch().default.some(
|
||||
(0, _jestUtil().replacePathSepForGlob)(path),
|
||||
globs,
|
||||
{
|
||||
dot: true
|
||||
}
|
||||
);
|
||||
|
||||
const regexToMatcher = testRegex => path =>
|
||||
testRegex.some(testRegex => new RegExp(testRegex).test(path));
|
||||
|
||||
const toTests = (context, tests) =>
|
||||
tests.map(path => ({
|
||||
context,
|
||||
duration: undefined,
|
||||
path
|
||||
}));
|
||||
|
||||
class SearchSource {
|
||||
constructor(context) {
|
||||
_defineProperty(this, '_context', void 0);
|
||||
|
||||
_defineProperty(this, '_testPathCases', []);
|
||||
|
||||
const config = context.config;
|
||||
this._context = context;
|
||||
const rootPattern = new RegExp(
|
||||
config.roots
|
||||
.map(dir =>
|
||||
(0, _jestRegexUtil().escapePathForRegex)(dir + _path().default.sep)
|
||||
)
|
||||
.join('|')
|
||||
);
|
||||
|
||||
this._testPathCases.push({
|
||||
isMatch: path => rootPattern.test(path),
|
||||
stat: 'roots'
|
||||
});
|
||||
|
||||
if (config.testMatch.length) {
|
||||
this._testPathCases.push({
|
||||
isMatch: globsToMatcher(config.testMatch),
|
||||
stat: 'testMatch'
|
||||
});
|
||||
}
|
||||
|
||||
if (config.testPathIgnorePatterns.length) {
|
||||
const testIgnorePatternsRegex = new RegExp(
|
||||
config.testPathIgnorePatterns.join('|')
|
||||
);
|
||||
|
||||
this._testPathCases.push({
|
||||
isMatch: path => !testIgnorePatternsRegex.test(path),
|
||||
stat: 'testPathIgnorePatterns'
|
||||
});
|
||||
}
|
||||
|
||||
if (config.testRegex.length) {
|
||||
this._testPathCases.push({
|
||||
isMatch: regexToMatcher(config.testRegex),
|
||||
stat: 'testRegex'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
_filterTestPathsWithStats(allPaths, testPathPattern) {
|
||||
const data = {
|
||||
stats: {
|
||||
roots: 0,
|
||||
testMatch: 0,
|
||||
testPathIgnorePatterns: 0,
|
||||
testRegex: 0
|
||||
},
|
||||
tests: [],
|
||||
total: allPaths.length
|
||||
};
|
||||
const testCases = Array.from(this._testPathCases); // clone
|
||||
|
||||
if (testPathPattern) {
|
||||
const regex = (0, _jestUtil().testPathPatternToRegExp)(testPathPattern);
|
||||
testCases.push({
|
||||
isMatch: path => regex.test(path),
|
||||
stat: 'testPathPattern'
|
||||
});
|
||||
data.stats.testPathPattern = 0;
|
||||
}
|
||||
|
||||
data.tests = allPaths.filter(test => {
|
||||
let filterResult = true;
|
||||
|
||||
for (var _i = 0; _i < testCases.length; _i++) {
|
||||
const _testCases$_i = testCases[_i],
|
||||
isMatch = _testCases$_i.isMatch,
|
||||
stat = _testCases$_i.stat;
|
||||
|
||||
if (isMatch(test.path)) {
|
||||
data.stats[stat]++;
|
||||
} else {
|
||||
filterResult = false;
|
||||
}
|
||||
}
|
||||
|
||||
return filterResult;
|
||||
});
|
||||
return data;
|
||||
}
|
||||
|
||||
_getAllTestPaths(testPathPattern) {
|
||||
return this._filterTestPathsWithStats(
|
||||
toTests(this._context, this._context.hasteFS.getAllFiles()),
|
||||
testPathPattern
|
||||
);
|
||||
}
|
||||
|
||||
isTestFilePath(path) {
|
||||
return this._testPathCases.every(testCase => testCase.isMatch(path));
|
||||
}
|
||||
|
||||
findMatchingTests(testPathPattern) {
|
||||
return this._getAllTestPaths(testPathPattern);
|
||||
}
|
||||
|
||||
findRelatedTests(allPaths, collectCoverage) {
|
||||
const dependencyResolver = new (_jestResolveDependencies()).default(
|
||||
this._context.resolver,
|
||||
this._context.hasteFS,
|
||||
(0, _jestSnapshot().buildSnapshotResolver)(this._context.config)
|
||||
);
|
||||
|
||||
if (!collectCoverage) {
|
||||
return {
|
||||
tests: toTests(
|
||||
this._context,
|
||||
dependencyResolver.resolveInverse(
|
||||
allPaths,
|
||||
this.isTestFilePath.bind(this),
|
||||
{
|
||||
skipNodeResolution: this._context.config.skipNodeResolution
|
||||
}
|
||||
)
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
const testModulesMap = dependencyResolver.resolveInverseModuleMap(
|
||||
allPaths,
|
||||
this.isTestFilePath.bind(this),
|
||||
{
|
||||
skipNodeResolution: this._context.config.skipNodeResolution
|
||||
}
|
||||
);
|
||||
const allPathsAbsolute = Array.from(allPaths).map(p =>
|
||||
_path().default.resolve(p)
|
||||
);
|
||||
const collectCoverageFrom = new Set();
|
||||
testModulesMap.forEach(testModule => {
|
||||
if (!testModule.dependencies) {
|
||||
return;
|
||||
}
|
||||
|
||||
testModule.dependencies
|
||||
.filter(p => allPathsAbsolute.includes(p))
|
||||
.map(filename => {
|
||||
filename = (0, _jestConfig().replaceRootDirInPath)(
|
||||
this._context.config.rootDir,
|
||||
filename
|
||||
);
|
||||
return _path().default.isAbsolute(filename)
|
||||
? _path().default.relative(this._context.config.rootDir, filename)
|
||||
: filename;
|
||||
})
|
||||
.forEach(filename => collectCoverageFrom.add(filename));
|
||||
});
|
||||
return {
|
||||
collectCoverageFrom,
|
||||
tests: toTests(
|
||||
this._context,
|
||||
testModulesMap.map(testModule => testModule.file)
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
findTestsByPaths(paths) {
|
||||
return {
|
||||
tests: toTests(
|
||||
this._context,
|
||||
paths
|
||||
.map(p => _path().default.resolve(this._context.config.cwd, p))
|
||||
.filter(this.isTestFilePath.bind(this))
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
findRelatedTestsFromPattern(paths, collectCoverage) {
|
||||
if (Array.isArray(paths) && paths.length) {
|
||||
const resolvedPaths = paths.map(p =>
|
||||
_path().default.resolve(this._context.config.cwd, p)
|
||||
);
|
||||
return this.findRelatedTests(new Set(resolvedPaths), collectCoverage);
|
||||
}
|
||||
|
||||
return {
|
||||
tests: []
|
||||
};
|
||||
}
|
||||
|
||||
findTestRelatedToChangedFiles(changedFilesInfo, collectCoverage) {
|
||||
const repos = changedFilesInfo.repos,
|
||||
changedFiles = changedFilesInfo.changedFiles; // no SCM (git/hg/...) is found in any of the roots.
|
||||
|
||||
const noSCM = Object.keys(repos).every(scm => repos[scm].size === 0);
|
||||
return noSCM
|
||||
? {
|
||||
noSCM: true,
|
||||
tests: []
|
||||
}
|
||||
: this.findRelatedTests(changedFiles, collectCoverage);
|
||||
}
|
||||
|
||||
_getTestPaths(globalConfig, changedFiles) {
|
||||
const paths = globalConfig.nonFlagArgs;
|
||||
|
||||
if (globalConfig.onlyChanged) {
|
||||
if (!changedFiles) {
|
||||
throw new Error('Changed files must be set when running with -o.');
|
||||
}
|
||||
|
||||
return this.findTestRelatedToChangedFiles(
|
||||
changedFiles,
|
||||
globalConfig.collectCoverage
|
||||
);
|
||||
} else if (globalConfig.runTestsByPath && paths && paths.length) {
|
||||
return this.findTestsByPaths(paths);
|
||||
} else if (globalConfig.findRelatedTests && paths && paths.length) {
|
||||
return this.findRelatedTestsFromPattern(
|
||||
paths,
|
||||
globalConfig.collectCoverage
|
||||
);
|
||||
} else if (globalConfig.testPathPattern != null) {
|
||||
return this.findMatchingTests(globalConfig.testPathPattern);
|
||||
} else {
|
||||
return {
|
||||
tests: []
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
getTestPaths(globalConfig, changedFiles, filter) {
|
||||
var _this = this;
|
||||
|
||||
return _asyncToGenerator(function*() {
|
||||
const searchResult = _this._getTestPaths(globalConfig, changedFiles);
|
||||
|
||||
const filterPath = globalConfig.filter;
|
||||
|
||||
if (filter) {
|
||||
const tests = searchResult.tests;
|
||||
const filterResult = yield filter(tests.map(test => test.path));
|
||||
|
||||
if (!Array.isArray(filterResult.filtered)) {
|
||||
throw new Error(
|
||||
`Filter ${filterPath} did not return a valid test list`
|
||||
);
|
||||
}
|
||||
|
||||
const filteredSet = new Set(
|
||||
filterResult.filtered.map(result => result.test)
|
||||
);
|
||||
return _objectSpread({}, searchResult, {
|
||||
tests: tests.filter(test => filteredSet.has(test.path))
|
||||
});
|
||||
}
|
||||
|
||||
return searchResult;
|
||||
})();
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = SearchSource;
|
31
node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts
generated
vendored
Normal file
31
node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
* 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 { AggregatedResult, AssertionLocation } from '@jest/test-result';
|
||||
export default class SnapshotInteractiveMode {
|
||||
private _pipe;
|
||||
private _isActive;
|
||||
private _updateTestRunnerConfig;
|
||||
private _testAssertions;
|
||||
private _countPaths;
|
||||
private _skippedNum;
|
||||
constructor(pipe: NodeJS.WritableStream);
|
||||
isActive(): boolean;
|
||||
getSkippedNum(): number;
|
||||
private _clearTestSummary;
|
||||
private _drawUIProgress;
|
||||
private _drawUIDoneWithSkipped;
|
||||
private _drawUIDone;
|
||||
private _drawUIOverlay;
|
||||
put(key: string): void;
|
||||
abort(): void;
|
||||
restart(): void;
|
||||
updateWithResults(results: AggregatedResult): void;
|
||||
private _run;
|
||||
run(failedSnapshotTestAssertions: Array<AssertionLocation>, onConfigChange: (assertion: AssertionLocation | null, shouldUpdateSnapshot: boolean) => unknown): void;
|
||||
}
|
||||
//# sourceMappingURL=SnapshotInteractiveMode.d.ts.map
|
1
node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"SnapshotInteractiveMode.d.ts","sourceRoot":"","sources":["../src/SnapshotInteractiveMode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,OAAO,EAAC,gBAAgB,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAMtE,MAAM,CAAC,OAAO,OAAO,uBAAuB;IAC1C,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,uBAAuB,CAGlB;IACb,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,WAAW,CAAS;gBAEhB,IAAI,EAAE,MAAM,CAAC,cAAc;IAMvC,QAAQ;IAIR,aAAa;IAIb,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,eAAe;IA0CvB,OAAO,CAAC,sBAAsB;IAiC9B,OAAO,CAAC,WAAW;IAwBnB,OAAO,CAAC,cAAc;IAYtB,GAAG,CAAC,GAAG,EAAE,MAAM;IAqCf,KAAK;IAML,OAAO;IAMP,iBAAiB,CAAC,OAAO,EAAE,gBAAgB;IAiB3C,OAAO,CAAC,IAAI;IAKZ,GAAG,CACD,4BAA4B,EAAE,KAAK,CAAC,iBAAiB,CAAC,EACtD,cAAc,EAAE,CACd,SAAS,EAAE,iBAAiB,GAAG,IAAI,EACnC,oBAAoB,EAAE,OAAO,KAC1B,OAAO;CAYf"}
|
328
node_modules/@jest/core/build/SnapshotInteractiveMode.js
generated
vendored
Normal file
328
node_modules/@jest/core/build/SnapshotInteractiveMode.js
generated
vendored
Normal file
|
@ -0,0 +1,328 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _ansiEscapes() {
|
||||
const data = _interopRequireDefault(require('ansi-escapes'));
|
||||
|
||||
_ansiEscapes = function _ansiEscapes() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestWatcher() {
|
||||
const data = require('jest-watcher');
|
||||
|
||||
_jestWatcher = function _jestWatcher() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestUtil() {
|
||||
const data = require('jest-util');
|
||||
|
||||
_jestUtil = function _jestUtil() {
|
||||
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;
|
||||
}
|
||||
|
||||
const ARROW = _jestUtil().specialChars.ARROW,
|
||||
CLEAR = _jestUtil().specialChars.CLEAR;
|
||||
|
||||
class SnapshotInteractiveMode {
|
||||
constructor(pipe) {
|
||||
_defineProperty(this, '_pipe', void 0);
|
||||
|
||||
_defineProperty(this, '_isActive', void 0);
|
||||
|
||||
_defineProperty(this, '_updateTestRunnerConfig', void 0);
|
||||
|
||||
_defineProperty(this, '_testAssertions', void 0);
|
||||
|
||||
_defineProperty(this, '_countPaths', void 0);
|
||||
|
||||
_defineProperty(this, '_skippedNum', void 0);
|
||||
|
||||
this._pipe = pipe;
|
||||
this._isActive = false;
|
||||
this._skippedNum = 0;
|
||||
}
|
||||
|
||||
isActive() {
|
||||
return this._isActive;
|
||||
}
|
||||
|
||||
getSkippedNum() {
|
||||
return this._skippedNum;
|
||||
}
|
||||
|
||||
_clearTestSummary() {
|
||||
this._pipe.write(_ansiEscapes().default.cursorUp(6));
|
||||
|
||||
this._pipe.write(_ansiEscapes().default.eraseDown);
|
||||
}
|
||||
|
||||
_drawUIProgress() {
|
||||
this._clearTestSummary();
|
||||
|
||||
const numPass = this._countPaths - this._testAssertions.length;
|
||||
const numRemaining = this._countPaths - numPass - this._skippedNum;
|
||||
|
||||
let stats = _chalk().default.bold.dim(
|
||||
(0, _jestUtil().pluralize)('snapshot', numRemaining) + ' remaining'
|
||||
);
|
||||
|
||||
if (numPass) {
|
||||
stats +=
|
||||
', ' +
|
||||
_chalk().default.bold.green(
|
||||
(0, _jestUtil().pluralize)('snapshot', numPass) + ' updated'
|
||||
);
|
||||
}
|
||||
|
||||
if (this._skippedNum) {
|
||||
stats +=
|
||||
', ' +
|
||||
_chalk().default.bold.yellow(
|
||||
(0, _jestUtil().pluralize)('snapshot', this._skippedNum) + ' skipped'
|
||||
);
|
||||
}
|
||||
|
||||
const messages = [
|
||||
'\n' + _chalk().default.bold('Interactive Snapshot Progress'),
|
||||
ARROW + stats,
|
||||
'\n' + _chalk().default.bold('Watch Usage'),
|
||||
_chalk().default.dim(ARROW + 'Press ') +
|
||||
'u' +
|
||||
_chalk().default.dim(' to update failing snapshots for this test.'),
|
||||
_chalk().default.dim(ARROW + 'Press ') +
|
||||
's' +
|
||||
_chalk().default.dim(' to skip the current test.'),
|
||||
_chalk().default.dim(ARROW + 'Press ') +
|
||||
'q' +
|
||||
_chalk().default.dim(' to quit Interactive Snapshot Mode.'),
|
||||
_chalk().default.dim(ARROW + 'Press ') +
|
||||
'Enter' +
|
||||
_chalk().default.dim(' to trigger a test run.')
|
||||
];
|
||||
|
||||
this._pipe.write(messages.filter(Boolean).join('\n') + '\n');
|
||||
}
|
||||
|
||||
_drawUIDoneWithSkipped() {
|
||||
this._pipe.write(CLEAR);
|
||||
|
||||
const numPass = this._countPaths - this._testAssertions.length;
|
||||
|
||||
let stats = _chalk().default.bold.dim(
|
||||
(0, _jestUtil().pluralize)('snapshot', this._countPaths) + ' reviewed'
|
||||
);
|
||||
|
||||
if (numPass) {
|
||||
stats +=
|
||||
', ' +
|
||||
_chalk().default.bold.green(
|
||||
(0, _jestUtil().pluralize)('snapshot', numPass) + ' updated'
|
||||
);
|
||||
}
|
||||
|
||||
if (this._skippedNum) {
|
||||
stats +=
|
||||
', ' +
|
||||
_chalk().default.bold.yellow(
|
||||
(0, _jestUtil().pluralize)('snapshot', this._skippedNum) + ' skipped'
|
||||
);
|
||||
}
|
||||
|
||||
const messages = [
|
||||
'\n' + _chalk().default.bold('Interactive Snapshot Result'),
|
||||
ARROW + stats,
|
||||
'\n' + _chalk().default.bold('Watch Usage'),
|
||||
_chalk().default.dim(ARROW + 'Press ') +
|
||||
'r' +
|
||||
_chalk().default.dim(' to restart Interactive Snapshot Mode.'),
|
||||
_chalk().default.dim(ARROW + 'Press ') +
|
||||
'q' +
|
||||
_chalk().default.dim(' to quit Interactive Snapshot Mode.')
|
||||
];
|
||||
|
||||
this._pipe.write(messages.filter(Boolean).join('\n') + '\n');
|
||||
}
|
||||
|
||||
_drawUIDone() {
|
||||
this._pipe.write(CLEAR);
|
||||
|
||||
const numPass = this._countPaths - this._testAssertions.length;
|
||||
|
||||
let stats = _chalk().default.bold.dim(
|
||||
(0, _jestUtil().pluralize)('snapshot', this._countPaths) + ' reviewed'
|
||||
);
|
||||
|
||||
if (numPass) {
|
||||
stats +=
|
||||
', ' +
|
||||
_chalk().default.bold.green(
|
||||
(0, _jestUtil().pluralize)('snapshot', numPass) + ' updated'
|
||||
);
|
||||
}
|
||||
|
||||
const messages = [
|
||||
'\n' + _chalk().default.bold('Interactive Snapshot Result'),
|
||||
ARROW + stats,
|
||||
'\n' + _chalk().default.bold('Watch Usage'),
|
||||
_chalk().default.dim(ARROW + 'Press ') +
|
||||
'Enter' +
|
||||
_chalk().default.dim(' to return to watch mode.')
|
||||
];
|
||||
|
||||
this._pipe.write(messages.filter(Boolean).join('\n') + '\n');
|
||||
}
|
||||
|
||||
_drawUIOverlay() {
|
||||
if (this._testAssertions.length === 0) {
|
||||
return this._drawUIDone();
|
||||
}
|
||||
|
||||
if (this._testAssertions.length - this._skippedNum === 0) {
|
||||
return this._drawUIDoneWithSkipped();
|
||||
}
|
||||
|
||||
return this._drawUIProgress();
|
||||
}
|
||||
|
||||
put(key) {
|
||||
switch (key) {
|
||||
case 's':
|
||||
if (this._skippedNum === this._testAssertions.length) break;
|
||||
this._skippedNum += 1; // move skipped test to the end
|
||||
|
||||
this._testAssertions.push(this._testAssertions.shift());
|
||||
|
||||
if (this._testAssertions.length - this._skippedNum > 0) {
|
||||
this._run(false);
|
||||
} else {
|
||||
this._drawUIDoneWithSkipped();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
this._run(true);
|
||||
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
case _jestWatcher().KEYS.ESCAPE:
|
||||
this.abort();
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
this.restart();
|
||||
break;
|
||||
|
||||
case _jestWatcher().KEYS.ENTER:
|
||||
if (this._testAssertions.length === 0) {
|
||||
this.abort();
|
||||
} else {
|
||||
this._run(false);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
abort() {
|
||||
this._isActive = false;
|
||||
this._skippedNum = 0;
|
||||
|
||||
this._updateTestRunnerConfig(null, false);
|
||||
}
|
||||
|
||||
restart() {
|
||||
this._skippedNum = 0;
|
||||
this._countPaths = this._testAssertions.length;
|
||||
|
||||
this._run(false);
|
||||
}
|
||||
|
||||
updateWithResults(results) {
|
||||
const hasSnapshotFailure = !!results.snapshot.failure;
|
||||
|
||||
if (hasSnapshotFailure) {
|
||||
this._drawUIOverlay();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this._testAssertions.shift();
|
||||
|
||||
if (this._testAssertions.length - this._skippedNum === 0) {
|
||||
this._drawUIOverlay();
|
||||
|
||||
return;
|
||||
} // Go to the next test
|
||||
|
||||
this._run(false);
|
||||
}
|
||||
|
||||
_run(shouldUpdateSnapshot) {
|
||||
const testAssertion = this._testAssertions[0];
|
||||
|
||||
this._updateTestRunnerConfig(testAssertion, shouldUpdateSnapshot);
|
||||
}
|
||||
|
||||
run(failedSnapshotTestAssertions, onConfigChange) {
|
||||
if (!failedSnapshotTestAssertions.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._testAssertions = [...failedSnapshotTestAssertions];
|
||||
this._countPaths = this._testAssertions.length;
|
||||
this._updateTestRunnerConfig = onConfigChange;
|
||||
this._isActive = true;
|
||||
|
||||
this._run(false);
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = SnapshotInteractiveMode;
|
18
node_modules/@jest/core/build/TestNamePatternPrompt.d.ts
generated
vendored
Normal file
18
node_modules/@jest/core/build/TestNamePatternPrompt.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 { PatternPrompt, Prompt, ScrollOptions } from 'jest-watcher';
|
||||
import { TestResult } from '@jest/test-result';
|
||||
export default class TestNamePatternPrompt extends PatternPrompt {
|
||||
_cachedTestResults: Array<TestResult>;
|
||||
constructor(pipe: NodeJS.WritableStream, prompt: Prompt);
|
||||
_onChange(pattern: string, options: ScrollOptions): void;
|
||||
_printPrompt(pattern: string): void;
|
||||
_getMatchedTests(pattern: string): string[];
|
||||
updateCachedTestResults(testResults?: Array<TestResult>): void;
|
||||
}
|
||||
//# sourceMappingURL=TestNamePatternPrompt.d.ts.map
|
1
node_modules/@jest/core/build/TestNamePatternPrompt.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/TestNamePatternPrompt.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"TestNamePatternPrompt.d.ts","sourceRoot":"","sources":["../src/TestNamePatternPrompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EACL,aAAa,EACb,MAAM,EACN,aAAa,EAGd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,aAAa;IAC9D,kBAAkB,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;gBAE1B,IAAI,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM;IAMvD,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAKjD,YAAY,CAAC,OAAO,EAAE,MAAM;IAM5B,gBAAgB,CAAC,OAAO,EAAE,MAAM;IAsBhC,uBAAuB,CAAC,WAAW,GAAE,KAAK,CAAC,UAAU,CAAM;CAG5D"}
|
86
node_modules/@jest/core/build/TestNamePatternPrompt.js
generated
vendored
Normal file
86
node_modules/@jest/core/build/TestNamePatternPrompt.js
generated
vendored
Normal file
|
@ -0,0 +1,86 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestWatcher() {
|
||||
const data = require('jest-watcher');
|
||||
|
||||
_jestWatcher = function _jestWatcher() {
|
||||
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;
|
||||
}
|
||||
|
||||
// TODO: Make underscored props `private`
|
||||
class TestNamePatternPrompt extends _jestWatcher().PatternPrompt {
|
||||
constructor(pipe, prompt) {
|
||||
super(pipe, prompt);
|
||||
|
||||
_defineProperty(this, '_cachedTestResults', void 0);
|
||||
|
||||
this._entityName = 'tests';
|
||||
this._cachedTestResults = [];
|
||||
}
|
||||
|
||||
_onChange(pattern, options) {
|
||||
super._onChange(pattern, options);
|
||||
|
||||
this._printPrompt(pattern);
|
||||
}
|
||||
|
||||
_printPrompt(pattern) {
|
||||
const pipe = this._pipe;
|
||||
(0, _jestWatcher().printPatternCaret)(pattern, pipe);
|
||||
(0, _jestWatcher().printRestoredPatternCaret)(
|
||||
pattern,
|
||||
this._currentUsageRows,
|
||||
pipe
|
||||
);
|
||||
}
|
||||
|
||||
_getMatchedTests(pattern) {
|
||||
let regex;
|
||||
|
||||
try {
|
||||
regex = new RegExp(pattern, 'i');
|
||||
} catch (e) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const matchedTests = [];
|
||||
|
||||
this._cachedTestResults.forEach(({testResults}) =>
|
||||
testResults.forEach(({title}) => {
|
||||
if (regex.test(title)) {
|
||||
matchedTests.push(title);
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
return matchedTests;
|
||||
}
|
||||
|
||||
updateCachedTestResults(testResults = []) {
|
||||
this._cachedTestResults = testResults;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = TestNamePatternPrompt;
|
25
node_modules/@jest/core/build/TestPathPatternPrompt.d.ts
generated
vendored
Normal file
25
node_modules/@jest/core/build/TestPathPatternPrompt.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* 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 { Context } from 'jest-runtime';
|
||||
import { Test } from 'jest-runner';
|
||||
import { PatternPrompt, Prompt, ScrollOptions } from 'jest-watcher';
|
||||
import SearchSource from './SearchSource';
|
||||
declare type SearchSources = Array<{
|
||||
context: Context;
|
||||
searchSource: SearchSource;
|
||||
}>;
|
||||
export default class TestPathPatternPrompt extends PatternPrompt {
|
||||
_searchSources?: SearchSources;
|
||||
constructor(pipe: NodeJS.WritableStream, prompt: Prompt);
|
||||
_onChange(pattern: string, options: ScrollOptions): void;
|
||||
_printPrompt(pattern: string): void;
|
||||
_getMatchedTests(pattern: string): Array<Test>;
|
||||
updateSearchSources(searchSources: SearchSources): void;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=TestPathPatternPrompt.d.ts.map
|
1
node_modules/@jest/core/build/TestPathPatternPrompt.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/TestPathPatternPrompt.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"TestPathPatternPrompt.d.ts","sourceRoot":"","sources":["../src/TestPathPatternPrompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EACL,aAAa,EACb,MAAM,EACN,aAAa,EAGd,MAAM,cAAc,CAAC;AACtB,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,aAAK,aAAa,GAAG,KAAK,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC,CAAC;AAGH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,aAAa;IAC9D,cAAc,CAAC,EAAE,aAAa,CAAC;gBAEnB,IAAI,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM;IAKvD,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAKjD,YAAY,CAAC,OAAO,EAAE,MAAM;IAM5B,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC;IAiB9C,mBAAmB,CAAC,aAAa,EAAE,aAAa;CAGjD"}
|
81
node_modules/@jest/core/build/TestPathPatternPrompt.js
generated
vendored
Normal file
81
node_modules/@jest/core/build/TestPathPatternPrompt.js
generated
vendored
Normal file
|
@ -0,0 +1,81 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestWatcher() {
|
||||
const data = require('jest-watcher');
|
||||
|
||||
_jestWatcher = function _jestWatcher() {
|
||||
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;
|
||||
}
|
||||
|
||||
// TODO: Make underscored props `private`
|
||||
class TestPathPatternPrompt extends _jestWatcher().PatternPrompt {
|
||||
constructor(pipe, prompt) {
|
||||
super(pipe, prompt);
|
||||
|
||||
_defineProperty(this, '_searchSources', void 0);
|
||||
|
||||
this._entityName = 'filenames';
|
||||
}
|
||||
|
||||
_onChange(pattern, options) {
|
||||
super._onChange(pattern, options);
|
||||
|
||||
this._printPrompt(pattern);
|
||||
}
|
||||
|
||||
_printPrompt(pattern) {
|
||||
const pipe = this._pipe;
|
||||
(0, _jestWatcher().printPatternCaret)(pattern, pipe);
|
||||
(0, _jestWatcher().printRestoredPatternCaret)(
|
||||
pattern,
|
||||
this._currentUsageRows,
|
||||
pipe
|
||||
);
|
||||
}
|
||||
|
||||
_getMatchedTests(pattern) {
|
||||
let regex;
|
||||
|
||||
try {
|
||||
regex = new RegExp(pattern, 'i');
|
||||
} catch (e) {}
|
||||
|
||||
let tests = [];
|
||||
|
||||
if (regex && this._searchSources) {
|
||||
this._searchSources.forEach(({searchSource}) => {
|
||||
tests = tests.concat(searchSource.findMatchingTests(pattern).tests);
|
||||
});
|
||||
}
|
||||
|
||||
return tests;
|
||||
}
|
||||
|
||||
updateSearchSources(searchSources) {
|
||||
this._searchSources = searchSources;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = TestPathPatternPrompt;
|
41
node_modules/@jest/core/build/TestScheduler.d.ts
generated
vendored
Normal file
41
node_modules/@jest/core/build/TestScheduler.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
/**
|
||||
* 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 { Test } from 'jest-runner';
|
||||
import { Reporter } from '@jest/reporters';
|
||||
import { AggregatedResult } from '@jest/test-result';
|
||||
import TestWatcher from './TestWatcher';
|
||||
export declare type TestSchedulerOptions = {
|
||||
startRun: (globalConfig: Config.GlobalConfig) => void;
|
||||
};
|
||||
export declare type TestSchedulerContext = {
|
||||
firstRun: boolean;
|
||||
previousSuccess: boolean;
|
||||
changedFiles?: Set<Config.Path>;
|
||||
};
|
||||
export default class TestScheduler {
|
||||
private _dispatcher;
|
||||
private _globalConfig;
|
||||
private _options;
|
||||
private _context;
|
||||
constructor(globalConfig: Config.GlobalConfig, options: TestSchedulerOptions, context: TestSchedulerContext);
|
||||
addReporter(reporter: Reporter): void;
|
||||
removeReporter(ReporterClass: Function): void;
|
||||
scheduleTests(tests: Array<Test>, watcher: TestWatcher): Promise<AggregatedResult>;
|
||||
private _partitionTests;
|
||||
private _shouldAddDefaultReporters;
|
||||
private _setupReporters;
|
||||
private _setupDefaultReporters;
|
||||
private _addCustomReporters;
|
||||
/**
|
||||
* Get properties of a reporter in an object
|
||||
* to make dealing with them less painful.
|
||||
*/
|
||||
private _getReporterProps;
|
||||
private _bailIfNeeded;
|
||||
}
|
||||
//# sourceMappingURL=TestScheduler.d.ts.map
|
1
node_modules/@jest/core/build/TestScheduler.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/TestScheduler.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"TestScheduler.d.ts","sourceRoot":"","sources":["../src/TestScheduler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAmB,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAE7C,OAAO,EAML,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEL,gBAAgB,EAKjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,WAAW,MAAM,eAAe,CAAC;AAOxC,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,KAAK,IAAI,CAAC;CACvD,CAAC;AACF,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AACF,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,QAAQ,CAAuB;gBAGrC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,oBAAoB;IAS/B,WAAW,CAAC,QAAQ,EAAE,QAAQ;IAI9B,cAAc,CAAC,aAAa,EAAE,QAAQ;IAIhC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,WAAW;IAsJ5D,OAAO,CAAC,eAAe;IAuBvB,OAAO,CAAC,0BAA0B;IAWlC,OAAO,CAAC,eAAe;IA+BvB,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,mBAAmB;IAsB3B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,aAAa;CAsBtB"}
|
563
node_modules/@jest/core/build/TestScheduler.js
generated
vendored
Normal file
563
node_modules/@jest/core/build/TestScheduler.js
generated
vendored
Normal file
|
@ -0,0 +1,563 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestMessageUtil() {
|
||||
const data = require('jest-message-util');
|
||||
|
||||
_jestMessageUtil = function _jestMessageUtil() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestSnapshot() {
|
||||
const data = _interopRequireDefault(require('jest-snapshot'));
|
||||
|
||||
_jestSnapshot = function _jestSnapshot() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestRunner() {
|
||||
const data = _interopRequireDefault(require('jest-runner'));
|
||||
|
||||
_jestRunner = function _jestRunner() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _reporters() {
|
||||
const data = require('@jest/reporters');
|
||||
|
||||
_reporters = function _reporters() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _exit() {
|
||||
const data = _interopRequireDefault(require('exit'));
|
||||
|
||||
_exit = function _exit() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _testResult() {
|
||||
const data = require('@jest/test-result');
|
||||
|
||||
_testResult = function _testResult() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _ReporterDispatcher = _interopRequireDefault(
|
||||
require('./ReporterDispatcher')
|
||||
);
|
||||
|
||||
var _testSchedulerHelper = require('./testSchedulerHelper');
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _slicedToArray(arr, i) {
|
||||
return (
|
||||
_arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest()
|
||||
);
|
||||
}
|
||||
|
||||
function _nonIterableRest() {
|
||||
throw new TypeError('Invalid attempt to destructure non-iterable instance');
|
||||
}
|
||||
|
||||
function _iterableToArrayLimit(arr, i) {
|
||||
var _arr = [];
|
||||
var _n = true;
|
||||
var _d = false;
|
||||
var _e = undefined;
|
||||
try {
|
||||
for (
|
||||
var _i = arr[Symbol.iterator](), _s;
|
||||
!(_n = (_s = _i.next()).done);
|
||||
_n = true
|
||||
) {
|
||||
_arr.push(_s.value);
|
||||
if (i && _arr.length === i) break;
|
||||
}
|
||||
} catch (err) {
|
||||
_d = true;
|
||||
_e = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_n && _i['return'] != null) _i['return']();
|
||||
} finally {
|
||||
if (_d) throw _e;
|
||||
}
|
||||
}
|
||||
return _arr;
|
||||
}
|
||||
|
||||
function _arrayWithHoles(arr) {
|
||||
if (Array.isArray(arr)) return arr;
|
||||
}
|
||||
|
||||
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 _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;
|
||||
}
|
||||
|
||||
// The default jest-runner is required because it is the default test runner
|
||||
// and required implicitly through the `runner` ProjectConfig option.
|
||||
_jestRunner().default;
|
||||
|
||||
class TestScheduler {
|
||||
constructor(globalConfig, options, context) {
|
||||
_defineProperty(this, '_dispatcher', void 0);
|
||||
|
||||
_defineProperty(this, '_globalConfig', void 0);
|
||||
|
||||
_defineProperty(this, '_options', void 0);
|
||||
|
||||
_defineProperty(this, '_context', void 0);
|
||||
|
||||
this._dispatcher = new _ReporterDispatcher.default();
|
||||
this._globalConfig = globalConfig;
|
||||
this._options = options;
|
||||
this._context = context;
|
||||
|
||||
this._setupReporters();
|
||||
}
|
||||
|
||||
addReporter(reporter) {
|
||||
this._dispatcher.register(reporter);
|
||||
}
|
||||
|
||||
removeReporter(ReporterClass) {
|
||||
this._dispatcher.unregister(ReporterClass);
|
||||
}
|
||||
|
||||
scheduleTests(tests, watcher) {
|
||||
var _this = this;
|
||||
|
||||
return _asyncToGenerator(function*() {
|
||||
const onStart = _this._dispatcher.onTestStart.bind(_this._dispatcher);
|
||||
|
||||
const timings = [];
|
||||
const contexts = new Set();
|
||||
tests.forEach(test => {
|
||||
contexts.add(test.context);
|
||||
|
||||
if (test.duration) {
|
||||
timings.push(test.duration);
|
||||
}
|
||||
});
|
||||
const aggregatedResults = createAggregatedResults(tests.length);
|
||||
const estimatedTime = Math.ceil(
|
||||
getEstimatedTime(timings, _this._globalConfig.maxWorkers) / 1000
|
||||
);
|
||||
const runInBand = (0, _testSchedulerHelper.shouldRunInBand)(
|
||||
tests,
|
||||
timings,
|
||||
_this._globalConfig
|
||||
);
|
||||
|
||||
const onResult =
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _ref = _asyncToGenerator(function*(test, testResult) {
|
||||
if (watcher.isInterrupted()) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
if (testResult.testResults.length === 0) {
|
||||
const message = 'Your test suite must contain at least one test.';
|
||||
return onFailure(test, {
|
||||
message,
|
||||
stack: new Error(message).stack
|
||||
});
|
||||
} // Throws when the context is leaked after executing a test.
|
||||
|
||||
if (testResult.leaks) {
|
||||
const message =
|
||||
_chalk().default.red.bold('EXPERIMENTAL FEATURE!\n') +
|
||||
'Your test suite is leaking memory. Please ensure all references are cleaned.\n' +
|
||||
'\n' +
|
||||
'There is a number of things that can leak memory:\n' +
|
||||
' - Async operations that have not finished (e.g. fs.readFile).\n' +
|
||||
' - Timers not properly mocked (e.g. setInterval, setTimeout).\n' +
|
||||
' - Keeping references to the global scope.';
|
||||
return onFailure(test, {
|
||||
message,
|
||||
stack: new Error(message).stack
|
||||
});
|
||||
}
|
||||
|
||||
(0, _testResult().addResult)(aggregatedResults, testResult);
|
||||
yield _this._dispatcher.onTestResult(
|
||||
test,
|
||||
testResult,
|
||||
aggregatedResults
|
||||
);
|
||||
return _this._bailIfNeeded(contexts, aggregatedResults, watcher);
|
||||
});
|
||||
|
||||
return function onResult(_x, _x2) {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
const onFailure =
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _ref2 = _asyncToGenerator(function*(test, error) {
|
||||
if (watcher.isInterrupted()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const testResult = (0, _testResult().buildFailureTestResult)(
|
||||
test.path,
|
||||
error
|
||||
);
|
||||
testResult.failureMessage = (0, _jestMessageUtil().formatExecError)(
|
||||
testResult.testExecError,
|
||||
test.context.config,
|
||||
_this._globalConfig,
|
||||
test.path
|
||||
);
|
||||
(0, _testResult().addResult)(aggregatedResults, testResult);
|
||||
yield _this._dispatcher.onTestResult(
|
||||
test,
|
||||
testResult,
|
||||
aggregatedResults
|
||||
);
|
||||
});
|
||||
|
||||
return function onFailure(_x3, _x4) {
|
||||
return _ref2.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
const updateSnapshotState = () => {
|
||||
contexts.forEach(context => {
|
||||
const status = _jestSnapshot().default.cleanup(
|
||||
context.hasteFS,
|
||||
_this._globalConfig.updateSnapshot,
|
||||
_jestSnapshot().default.buildSnapshotResolver(context.config),
|
||||
context.config.testPathIgnorePatterns
|
||||
);
|
||||
|
||||
aggregatedResults.snapshot.filesRemoved += status.filesRemoved;
|
||||
aggregatedResults.snapshot.filesRemovedList = (
|
||||
aggregatedResults.snapshot.filesRemovedList || []
|
||||
).concat(status.filesRemovedList);
|
||||
});
|
||||
const updateAll = _this._globalConfig.updateSnapshot === 'all';
|
||||
aggregatedResults.snapshot.didUpdate = updateAll;
|
||||
aggregatedResults.snapshot.failure = !!(
|
||||
!updateAll &&
|
||||
(aggregatedResults.snapshot.unchecked ||
|
||||
aggregatedResults.snapshot.unmatched ||
|
||||
aggregatedResults.snapshot.filesRemoved)
|
||||
);
|
||||
};
|
||||
|
||||
yield _this._dispatcher.onRunStart(aggregatedResults, {
|
||||
estimatedTime,
|
||||
showStatus: !runInBand
|
||||
});
|
||||
const testRunners = Object.create(null);
|
||||
contexts.forEach(({config}) => {
|
||||
if (!testRunners[config.runner]) {
|
||||
const Runner = require(config.runner);
|
||||
|
||||
testRunners[config.runner] = new Runner(_this._globalConfig, {
|
||||
changedFiles: _this._context && _this._context.changedFiles
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const testsByRunner = _this._partitionTests(testRunners, tests);
|
||||
|
||||
if (testsByRunner) {
|
||||
try {
|
||||
var _arr = Object.keys(testRunners);
|
||||
|
||||
for (var _i = 0; _i < _arr.length; _i++) {
|
||||
const runner = _arr[_i];
|
||||
yield testRunners[runner].runTests(
|
||||
testsByRunner[runner],
|
||||
watcher,
|
||||
onStart,
|
||||
onResult,
|
||||
onFailure,
|
||||
{
|
||||
serial: runInBand || Boolean(testRunners[runner].isSerial)
|
||||
}
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
if (!watcher.isInterrupted()) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updateSnapshotState();
|
||||
aggregatedResults.wasInterrupted = watcher.isInterrupted();
|
||||
yield _this._dispatcher.onRunComplete(contexts, aggregatedResults);
|
||||
const anyTestFailures = !(
|
||||
aggregatedResults.numFailedTests === 0 &&
|
||||
aggregatedResults.numRuntimeErrorTestSuites === 0
|
||||
);
|
||||
|
||||
const anyReporterErrors = _this._dispatcher.hasErrors();
|
||||
|
||||
aggregatedResults.success = !(
|
||||
anyTestFailures ||
|
||||
aggregatedResults.snapshot.failure ||
|
||||
anyReporterErrors
|
||||
);
|
||||
return aggregatedResults;
|
||||
})();
|
||||
}
|
||||
|
||||
_partitionTests(testRunners, tests) {
|
||||
if (Object.keys(testRunners).length > 1) {
|
||||
return tests.reduce((testRuns, test) => {
|
||||
const runner = test.context.config.runner;
|
||||
|
||||
if (!testRuns[runner]) {
|
||||
testRuns[runner] = [];
|
||||
}
|
||||
|
||||
testRuns[runner].push(test);
|
||||
return testRuns;
|
||||
}, Object.create(null));
|
||||
} else if (tests.length > 0 && tests[0] != null) {
|
||||
// If there is only one runner, don't partition the tests.
|
||||
return Object.assign(Object.create(null), {
|
||||
[tests[0].context.config.runner]: tests
|
||||
});
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
_shouldAddDefaultReporters(reporters) {
|
||||
return (
|
||||
!reporters ||
|
||||
!!reporters.find(
|
||||
reporter => this._getReporterProps(reporter).path === 'default'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
_setupReporters() {
|
||||
const _this$_globalConfig = this._globalConfig,
|
||||
collectCoverage = _this$_globalConfig.collectCoverage,
|
||||
notify = _this$_globalConfig.notify,
|
||||
reporters = _this$_globalConfig.reporters;
|
||||
|
||||
const isDefault = this._shouldAddDefaultReporters(reporters);
|
||||
|
||||
if (isDefault) {
|
||||
this._setupDefaultReporters(collectCoverage);
|
||||
}
|
||||
|
||||
if (!isDefault && collectCoverage) {
|
||||
this.addReporter(
|
||||
new (_reporters()).CoverageReporter(this._globalConfig, {
|
||||
changedFiles: this._context && this._context.changedFiles
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (notify) {
|
||||
this.addReporter(
|
||||
new (_reporters()).NotifyReporter(
|
||||
this._globalConfig,
|
||||
this._options.startRun,
|
||||
this._context
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (reporters && Array.isArray(reporters)) {
|
||||
this._addCustomReporters(reporters);
|
||||
}
|
||||
}
|
||||
|
||||
_setupDefaultReporters(collectCoverage) {
|
||||
this.addReporter(
|
||||
this._globalConfig.verbose
|
||||
? new (_reporters()).VerboseReporter(this._globalConfig)
|
||||
: new (_reporters()).DefaultReporter(this._globalConfig)
|
||||
);
|
||||
|
||||
if (collectCoverage) {
|
||||
this.addReporter(
|
||||
new (_reporters()).CoverageReporter(this._globalConfig, {
|
||||
changedFiles: this._context && this._context.changedFiles
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
this.addReporter(new (_reporters()).SummaryReporter(this._globalConfig));
|
||||
}
|
||||
|
||||
_addCustomReporters(reporters) {
|
||||
reporters.forEach(reporter => {
|
||||
const _this$_getReporterPro = this._getReporterProps(reporter),
|
||||
options = _this$_getReporterPro.options,
|
||||
path = _this$_getReporterPro.path;
|
||||
|
||||
if (path === 'default') return;
|
||||
|
||||
try {
|
||||
const Reporter = require(path);
|
||||
|
||||
this.addReporter(new Reporter(this._globalConfig, options));
|
||||
} catch (error) {
|
||||
throw new Error(
|
||||
'An error occurred while adding the reporter at path "' +
|
||||
path +
|
||||
'".' +
|
||||
error.message
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get properties of a reporter in an object
|
||||
* to make dealing with them less painful.
|
||||
*/
|
||||
|
||||
_getReporterProps(reporter) {
|
||||
if (typeof reporter === 'string') {
|
||||
return {
|
||||
options: this._options,
|
||||
path: reporter
|
||||
};
|
||||
} else if (Array.isArray(reporter)) {
|
||||
const _reporter = _slicedToArray(reporter, 2),
|
||||
path = _reporter[0],
|
||||
options = _reporter[1];
|
||||
|
||||
return {
|
||||
options,
|
||||
path
|
||||
};
|
||||
}
|
||||
|
||||
throw new Error('Reporter should be either a string or an array');
|
||||
}
|
||||
|
||||
_bailIfNeeded(contexts, aggregatedResults, watcher) {
|
||||
if (
|
||||
this._globalConfig.bail !== 0 &&
|
||||
aggregatedResults.numFailedTests >= this._globalConfig.bail
|
||||
) {
|
||||
if (watcher.isWatchMode()) {
|
||||
watcher.setState({
|
||||
interrupted: true
|
||||
});
|
||||
} else {
|
||||
const failureExit = () => (0, _exit().default)(1);
|
||||
|
||||
return this._dispatcher
|
||||
.onRunComplete(contexts, aggregatedResults)
|
||||
.then(failureExit)
|
||||
.catch(failureExit);
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = TestScheduler;
|
||||
|
||||
const createAggregatedResults = numTotalTestSuites => {
|
||||
const result = (0, _testResult().makeEmptyAggregatedTestResult)();
|
||||
result.numTotalTestSuites = numTotalTestSuites;
|
||||
result.startTime = Date.now();
|
||||
result.success = false;
|
||||
return result;
|
||||
};
|
||||
|
||||
const getEstimatedTime = (timings, workers) => {
|
||||
if (!timings.length) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const max = Math.max.apply(null, timings);
|
||||
return timings.length <= workers
|
||||
? max
|
||||
: Math.max(timings.reduce((sum, time) => sum + time) / workers, max);
|
||||
};
|
23
node_modules/@jest/core/build/TestWatcher.d.ts
generated
vendored
Normal file
23
node_modules/@jest/core/build/TestWatcher.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* 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 { EventEmitter } from 'events';
|
||||
declare type State = {
|
||||
interrupted: boolean;
|
||||
};
|
||||
export default class TestWatcher extends EventEmitter {
|
||||
state: State;
|
||||
private _isWatchMode;
|
||||
constructor({ isWatchMode }: {
|
||||
isWatchMode: boolean;
|
||||
});
|
||||
setState(state: State): void;
|
||||
isInterrupted(): boolean;
|
||||
isWatchMode(): boolean;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=TestWatcher.d.ts.map
|
1
node_modules/@jest/core/build/TestWatcher.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/TestWatcher.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"TestWatcher.d.ts","sourceRoot":"","sources":["../src/TestWatcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAEpC,aAAK,KAAK,GAAG;IACX,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY;IACnD,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,YAAY,CAAU;gBAElB,EAAC,WAAW,EAAC,EAAE;QAAC,WAAW,EAAE,OAAO,CAAA;KAAC;IAMjD,QAAQ,CAAC,KAAK,EAAE,KAAK;IAKrB,aAAa;IAIb,WAAW;CAGZ"}
|
60
node_modules/@jest/core/build/TestWatcher.js
generated
vendored
Normal file
60
node_modules/@jest/core/build/TestWatcher.js
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _events() {
|
||||
const data = require('events');
|
||||
|
||||
_events = function _events() {
|
||||
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 TestWatcher extends _events().EventEmitter {
|
||||
constructor({isWatchMode}) {
|
||||
super();
|
||||
|
||||
_defineProperty(this, 'state', void 0);
|
||||
|
||||
_defineProperty(this, '_isWatchMode', void 0);
|
||||
|
||||
this.state = {
|
||||
interrupted: false
|
||||
};
|
||||
this._isWatchMode = isWatchMode;
|
||||
}
|
||||
|
||||
setState(state) {
|
||||
Object.assign(this.state, state);
|
||||
this.emit('change', this.state);
|
||||
}
|
||||
|
||||
isInterrupted() {
|
||||
return this.state.interrupted;
|
||||
}
|
||||
|
||||
isWatchMode() {
|
||||
return this._isWatchMode;
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = TestWatcher;
|
BIN
node_modules/@jest/core/build/assets/jest_logo.png
generated
vendored
Normal file
BIN
node_modules/@jest/core/build/assets/jest_logo.png
generated
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
100
node_modules/@jest/core/build/cli/index.d.ts
generated
vendored
Normal file
100
node_modules/@jest/core/build/cli/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,100 @@
|
|||
/**
|
||||
* 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 { Config } from '@jest/types';
|
||||
import { AggregatedResult } from '@jest/test-result';
|
||||
export declare const 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: string | 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;
|
||||
testTimeout: number | null | undefined;
|
||||
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: AggregatedResult;
|
||||
globalConfig: Config.GlobalConfig;
|
||||
}>;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
node_modules/@jest/core/build/cli/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/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;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAyBnD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8ElB,CAAC"}
|
471
node_modules/@jest/core/build/cli/index.js
generated
vendored
Normal file
471
node_modules/@jest/core/build/cli/index.js
generated
vendored
Normal file
|
@ -0,0 +1,471 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.runCLI = void 0;
|
||||
|
||||
function _console() {
|
||||
const data = require('@jest/console');
|
||||
|
||||
_console = function _console() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestUtil() {
|
||||
const data = require('jest-util');
|
||||
|
||||
_jestUtil = function _jestUtil() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestConfig() {
|
||||
const data = require('jest-config');
|
||||
|
||||
_jestConfig = function _jestConfig() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestRuntime() {
|
||||
const data = _interopRequireDefault(require('jest-runtime'));
|
||||
|
||||
_jestRuntime = function _jestRuntime() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _rimraf() {
|
||||
const data = _interopRequireDefault(require('rimraf'));
|
||||
|
||||
_rimraf = function _rimraf() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _exit() {
|
||||
const data = _interopRequireDefault(require('exit'));
|
||||
|
||||
_exit = function _exit() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _create_context = _interopRequireDefault(require('../lib/create_context'));
|
||||
|
||||
var _getChangedFilesPromise = _interopRequireDefault(
|
||||
require('../getChangedFilesPromise')
|
||||
);
|
||||
|
||||
var _collectHandles = require('../collectHandles');
|
||||
|
||||
var _handle_deprecation_warnings = _interopRequireDefault(
|
||||
require('../lib/handle_deprecation_warnings')
|
||||
);
|
||||
|
||||
var _runJest = _interopRequireDefault(require('../runJest'));
|
||||
|
||||
var _TestWatcher = _interopRequireDefault(require('../TestWatcher'));
|
||||
|
||||
var _watch = _interopRequireDefault(require('../watch'));
|
||||
|
||||
var _pluralize = _interopRequireDefault(require('../pluralize'));
|
||||
|
||||
var _log_debug_messages = _interopRequireDefault(
|
||||
require('../lib/log_debug_messages')
|
||||
);
|
||||
|
||||
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);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
const preRunMessagePrint = _jestUtil().preRunMessage.print;
|
||||
|
||||
const runCLI =
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _ref = _asyncToGenerator(function*(argv, projects) {
|
||||
const realFs = require('fs');
|
||||
|
||||
const fs = require('graceful-fs');
|
||||
|
||||
fs.gracefulify(realFs);
|
||||
let results; // If we output a JSON object, we can't write anything to stdout, since
|
||||
// it'll break the JSON structure and it won't be valid.
|
||||
|
||||
const outputStream =
|
||||
argv.json || argv.useStderr ? process.stderr : process.stdout;
|
||||
|
||||
const _readConfigs = (0, _jestConfig().readConfigs)(argv, projects),
|
||||
globalConfig = _readConfigs.globalConfig,
|
||||
configs = _readConfigs.configs,
|
||||
hasDeprecationWarnings = _readConfigs.hasDeprecationWarnings;
|
||||
|
||||
if (argv.debug) {
|
||||
(0, _log_debug_messages.default)(globalConfig, configs, outputStream);
|
||||
}
|
||||
|
||||
if (argv.showConfig) {
|
||||
(0, _log_debug_messages.default)(globalConfig, configs, process.stdout);
|
||||
(0, _exit().default)(0);
|
||||
}
|
||||
|
||||
if (argv.clearCache) {
|
||||
configs.forEach(config => {
|
||||
_rimraf().default.sync(config.cacheDirectory);
|
||||
|
||||
process.stdout.write(`Cleared ${config.cacheDirectory}\n`);
|
||||
});
|
||||
(0, _exit().default)(0);
|
||||
}
|
||||
|
||||
yield _run(
|
||||
globalConfig,
|
||||
configs,
|
||||
hasDeprecationWarnings,
|
||||
outputStream,
|
||||
r => (results = r)
|
||||
);
|
||||
|
||||
if (argv.watch || argv.watchAll) {
|
||||
// If in watch mode, return the promise that will never resolve.
|
||||
// If the watch mode is interrupted, watch should handle the process
|
||||
// shutdown.
|
||||
return new Promise(() => {});
|
||||
}
|
||||
|
||||
if (!results) {
|
||||
throw new Error(
|
||||
'AggregatedResult must be present after test run is complete'
|
||||
);
|
||||
}
|
||||
|
||||
const _results = results,
|
||||
openHandles = _results.openHandles;
|
||||
|
||||
if (openHandles && openHandles.length) {
|
||||
const formatted = (0, _collectHandles.formatHandleErrors)(
|
||||
openHandles,
|
||||
configs[0]
|
||||
);
|
||||
const openHandlesString = (0, _pluralize.default)(
|
||||
'open handle',
|
||||
formatted.length,
|
||||
's'
|
||||
);
|
||||
const message =
|
||||
_chalk().default.red(
|
||||
`\nJest has detected the following ${openHandlesString} potentially keeping Jest from exiting:\n\n`
|
||||
) + formatted.join('\n\n');
|
||||
console.error(message);
|
||||
}
|
||||
|
||||
return {
|
||||
globalConfig,
|
||||
results
|
||||
};
|
||||
});
|
||||
|
||||
return function runCLI(_x, _x2) {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
exports.runCLI = runCLI;
|
||||
|
||||
const buildContextsAndHasteMaps =
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _ref2 = _asyncToGenerator(function*(
|
||||
configs,
|
||||
globalConfig,
|
||||
outputStream
|
||||
) {
|
||||
const hasteMapInstances = Array(configs.length);
|
||||
const contexts = yield Promise.all(
|
||||
configs.map(
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _ref3 = _asyncToGenerator(function*(config, index) {
|
||||
(0, _jestUtil().createDirectory)(config.cacheDirectory);
|
||||
|
||||
const hasteMapInstance = _jestRuntime().default.createHasteMap(
|
||||
config,
|
||||
{
|
||||
console: new (_console()).CustomConsole(
|
||||
outputStream,
|
||||
outputStream
|
||||
),
|
||||
maxWorkers: globalConfig.maxWorkers,
|
||||
resetCache: !config.cache,
|
||||
watch: globalConfig.watch || globalConfig.watchAll,
|
||||
watchman: globalConfig.watchman
|
||||
}
|
||||
);
|
||||
|
||||
hasteMapInstances[index] = hasteMapInstance;
|
||||
return (0,
|
||||
_create_context.default)(config, yield hasteMapInstance.build());
|
||||
});
|
||||
|
||||
return function(_x6, _x7) {
|
||||
return _ref3.apply(this, arguments);
|
||||
};
|
||||
})()
|
||||
)
|
||||
);
|
||||
return {
|
||||
contexts,
|
||||
hasteMapInstances
|
||||
};
|
||||
});
|
||||
|
||||
return function buildContextsAndHasteMaps(_x3, _x4, _x5) {
|
||||
return _ref2.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
const _run =
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _ref4 = _asyncToGenerator(function*(
|
||||
globalConfig,
|
||||
configs,
|
||||
hasDeprecationWarnings,
|
||||
outputStream,
|
||||
onComplete
|
||||
) {
|
||||
// Queries to hg/git can take a while, so we need to start the process
|
||||
// as soon as possible, so by the time we need the result it's already there.
|
||||
const changedFilesPromise = (0, _getChangedFilesPromise.default)(
|
||||
globalConfig,
|
||||
configs
|
||||
); // Filter may need to do an HTTP call or something similar to setup.
|
||||
// We will wait on an async response from this before using the filter.
|
||||
|
||||
let filter;
|
||||
|
||||
if (globalConfig.filter && !globalConfig.skipFilter) {
|
||||
const rawFilter = require(globalConfig.filter);
|
||||
|
||||
let filterSetupPromise;
|
||||
|
||||
if (rawFilter.setup) {
|
||||
// Wrap filter setup Promise to avoid "uncaught Promise" error.
|
||||
// If an error is returned, we surface it in the return value.
|
||||
filterSetupPromise = _asyncToGenerator(function*() {
|
||||
try {
|
||||
yield rawFilter.setup();
|
||||
} catch (err) {
|
||||
return err;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
})();
|
||||
}
|
||||
|
||||
filter =
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _ref6 = _asyncToGenerator(function*(testPaths) {
|
||||
if (filterSetupPromise) {
|
||||
// Expect an undefined return value unless there was an error.
|
||||
const err = yield filterSetupPromise;
|
||||
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
return rawFilter(testPaths);
|
||||
});
|
||||
|
||||
return function filter(_x13) {
|
||||
return _ref6.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
}
|
||||
|
||||
const _ref7 = yield buildContextsAndHasteMaps(
|
||||
configs,
|
||||
globalConfig,
|
||||
outputStream
|
||||
),
|
||||
contexts = _ref7.contexts,
|
||||
hasteMapInstances = _ref7.hasteMapInstances;
|
||||
|
||||
globalConfig.watch || globalConfig.watchAll
|
||||
? yield runWatch(
|
||||
contexts,
|
||||
configs,
|
||||
hasDeprecationWarnings,
|
||||
globalConfig,
|
||||
outputStream,
|
||||
hasteMapInstances,
|
||||
filter
|
||||
)
|
||||
: yield runWithoutWatch(
|
||||
globalConfig,
|
||||
contexts,
|
||||
outputStream,
|
||||
onComplete,
|
||||
changedFilesPromise,
|
||||
filter
|
||||
);
|
||||
});
|
||||
|
||||
return function _run(_x8, _x9, _x10, _x11, _x12) {
|
||||
return _ref4.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
const runWatch =
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _ref8 = _asyncToGenerator(function*(
|
||||
contexts,
|
||||
_configs,
|
||||
hasDeprecationWarnings,
|
||||
globalConfig,
|
||||
outputStream,
|
||||
hasteMapInstances,
|
||||
filter
|
||||
) {
|
||||
if (hasDeprecationWarnings) {
|
||||
try {
|
||||
yield (0, _handle_deprecation_warnings.default)(
|
||||
outputStream,
|
||||
process.stdin
|
||||
);
|
||||
return (0, _watch.default)(
|
||||
globalConfig,
|
||||
contexts,
|
||||
outputStream,
|
||||
hasteMapInstances,
|
||||
undefined,
|
||||
undefined,
|
||||
filter
|
||||
);
|
||||
} catch (e) {
|
||||
(0, _exit().default)(0);
|
||||
}
|
||||
}
|
||||
|
||||
return (0, _watch.default)(
|
||||
globalConfig,
|
||||
contexts,
|
||||
outputStream,
|
||||
hasteMapInstances,
|
||||
undefined,
|
||||
undefined,
|
||||
filter
|
||||
);
|
||||
});
|
||||
|
||||
return function runWatch(_x14, _x15, _x16, _x17, _x18, _x19, _x20) {
|
||||
return _ref8.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
const runWithoutWatch =
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _ref9 = _asyncToGenerator(function*(
|
||||
globalConfig,
|
||||
contexts,
|
||||
outputStream,
|
||||
onComplete,
|
||||
changedFilesPromise,
|
||||
filter
|
||||
) {
|
||||
const startRun =
|
||||
/*#__PURE__*/
|
||||
(function() {
|
||||
var _ref10 = _asyncToGenerator(function*() {
|
||||
if (!globalConfig.listTests) {
|
||||
preRunMessagePrint(outputStream);
|
||||
}
|
||||
|
||||
return (0, _runJest.default)({
|
||||
changedFilesPromise,
|
||||
contexts,
|
||||
failedTestsCache: undefined,
|
||||
filter,
|
||||
globalConfig,
|
||||
onComplete,
|
||||
outputStream,
|
||||
startRun,
|
||||
testWatcher: new _TestWatcher.default({
|
||||
isWatchMode: false
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
return function startRun() {
|
||||
return _ref10.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
return startRun();
|
||||
});
|
||||
|
||||
return function runWithoutWatch(_x21, _x22, _x23, _x24, _x25, _x26) {
|
||||
return _ref9.apply(this, arguments);
|
||||
};
|
||||
})();
|
10
node_modules/@jest/core/build/collectHandles.d.ts
generated
vendored
Normal file
10
node_modules/@jest/core/build/collectHandles.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
export default function collectHandles(): () => Array<Error>;
|
||||
export declare function formatHandleErrors(errors: Array<Error>, config: Config.ProjectConfig): Array<string>;
|
||||
//# sourceMappingURL=collectHandles.d.ts.map
|
1
node_modules/@jest/core/build/collectHandles.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/collectHandles.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"collectHandles.d.ts","sourceRoot":"","sources":["../src/collectHandles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AA+BnC,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,MAAM,KAAK,CAAC,KAAK,CAAC,CA0C3D;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,EACpB,MAAM,EAAE,MAAM,CAAC,aAAa,GAC3B,KAAK,CAAC,MAAM,CAAC,CA8Bf"}
|
149
node_modules/@jest/core/build/collectHandles.js
generated
vendored
Normal file
149
node_modules/@jest/core/build/collectHandles.js
generated
vendored
Normal file
|
@ -0,0 +1,149 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = collectHandles;
|
||||
exports.formatHandleErrors = formatHandleErrors;
|
||||
|
||||
function _jestMessageUtil() {
|
||||
const data = require('jest-message-util');
|
||||
|
||||
_jestMessageUtil = function _jestMessageUtil() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestUtil() {
|
||||
const data = require('jest-util');
|
||||
|
||||
_jestUtil = function _jestUtil() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _stripAnsi() {
|
||||
const data = _interopRequireDefault(require('strip-ansi'));
|
||||
|
||||
_stripAnsi = function _stripAnsi() {
|
||||
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.
|
||||
*/
|
||||
function stackIsFromUser(stack) {
|
||||
// Either the test file, or something required by it
|
||||
if (stack.includes('Runtime.requireModule')) {
|
||||
return true;
|
||||
} // jest-jasmine it or describe call
|
||||
|
||||
if (stack.includes('asyncJestTest') || stack.includes('asyncJestLifecycle')) {
|
||||
return true;
|
||||
} // An async function call from within circus
|
||||
|
||||
if (stack.includes('callAsyncCircusFn')) {
|
||||
// jest-circus it or describe call
|
||||
return (
|
||||
stack.includes('_callCircusTest') || stack.includes('_callCircusHook')
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
} // Inspired by https://github.com/mafintosh/why-is-node-running/blob/master/index.js
|
||||
// Extracted as we want to format the result ourselves
|
||||
|
||||
function collectHandles() {
|
||||
const activeHandles = new Map();
|
||||
let hook;
|
||||
|
||||
try {
|
||||
const asyncHooks = require('async_hooks');
|
||||
|
||||
hook = asyncHooks.createHook({
|
||||
destroy(asyncId) {
|
||||
activeHandles.delete(asyncId);
|
||||
},
|
||||
|
||||
init: function initHook(asyncId, type) {
|
||||
if (type === 'PROMISE' || type === 'TIMERWRAP') {
|
||||
return;
|
||||
}
|
||||
|
||||
const error = new (_jestUtil()).ErrorWithStack(type, initHook);
|
||||
|
||||
if (stackIsFromUser(error.stack || '')) {
|
||||
activeHandles.set(asyncId, error);
|
||||
}
|
||||
}
|
||||
});
|
||||
hook.enable();
|
||||
} catch (e) {
|
||||
const nodeMajor = Number(process.versions.node.split('.')[0]);
|
||||
|
||||
if (e.code === 'MODULE_NOT_FOUND' && nodeMajor < 8) {
|
||||
throw new Error(
|
||||
'You can only use --detectOpenHandles on Node 8 and newer.'
|
||||
);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
return () => {
|
||||
hook.disable();
|
||||
const result = Array.from(activeHandles.values());
|
||||
activeHandles.clear();
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
function formatHandleErrors(errors, config) {
|
||||
const stacks = new Set();
|
||||
return (
|
||||
errors
|
||||
.map(err =>
|
||||
(0, _jestMessageUtil().formatExecError)(
|
||||
err,
|
||||
config,
|
||||
{
|
||||
noStackTrace: false
|
||||
},
|
||||
undefined,
|
||||
true
|
||||
)
|
||||
) // E.g. timeouts might give multiple traces to the same line of code
|
||||
// This hairy filtering tries to remove entries with duplicate stack traces
|
||||
.filter(handle => {
|
||||
const ansiFree = (0, _stripAnsi().default)(handle);
|
||||
const match = ansiFree.match(/\s+at(.*)/);
|
||||
|
||||
if (!match || match.length < 2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const stack = ansiFree.substr(ansiFree.indexOf(match[1])).trim();
|
||||
|
||||
if (stacks.has(stack)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
stacks.add(stack);
|
||||
return true;
|
||||
})
|
||||
);
|
||||
}
|
10
node_modules/@jest/core/build/getChangedFilesPromise.d.ts
generated
vendored
Normal file
10
node_modules/@jest/core/build/getChangedFilesPromise.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
declare const _default: (globalConfig: Config.GlobalConfig, configs: Config.ProjectConfig[]) => Promise<import("jest-changed-files").ChangedFiles> | undefined;
|
||||
export default _default;
|
||||
//# sourceMappingURL=getChangedFilesPromise.d.ts.map
|
1
node_modules/@jest/core/build/getChangedFilesPromise.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/getChangedFilesPromise.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"getChangedFilesPromise.d.ts","sourceRoot":"","sources":["../src/getChangedFilesPromise.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;AAKnC,wBA6BE"}
|
78
node_modules/@jest/core/build/getChangedFilesPromise.js
generated
vendored
Normal file
78
node_modules/@jest/core/build/getChangedFilesPromise.js
generated
vendored
Normal file
|
@ -0,0 +1,78 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestChangedFiles() {
|
||||
const data = require('jest-changed-files');
|
||||
|
||||
_jestChangedFiles = function _jestChangedFiles() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestMessageUtil() {
|
||||
const data = require('jest-message-util');
|
||||
|
||||
_jestMessageUtil = function _jestMessageUtil() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
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.
|
||||
*/
|
||||
var _default = (globalConfig, configs) => {
|
||||
if (globalConfig.onlyChanged) {
|
||||
const allRootsForAllProjects = configs.reduce(
|
||||
(roots, config) => [...roots, ...(config.roots || [])],
|
||||
[]
|
||||
);
|
||||
return (0, _jestChangedFiles().getChangedFilesForRoots)(
|
||||
allRootsForAllProjects,
|
||||
{
|
||||
changedSince: globalConfig.changedSince,
|
||||
lastCommit: globalConfig.lastCommit,
|
||||
withAncestor: globalConfig.changedFilesWithAncestor
|
||||
}
|
||||
).catch(e => {
|
||||
const message = (0, _jestMessageUtil().formatExecError)(e, configs[0], {
|
||||
noStackTrace: true
|
||||
})
|
||||
.split('\n')
|
||||
.filter(line => !line.includes('Command failed:'))
|
||||
.join('\n');
|
||||
console.error(_chalk().default.red(`\n\n${message}`));
|
||||
process.exit(1); // We do process.exit, so this is dead code
|
||||
|
||||
return Promise.reject(e);
|
||||
});
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
exports.default = _default;
|
10
node_modules/@jest/core/build/getNoTestFound.d.ts
generated
vendored
Normal file
10
node_modules/@jest/core/build/getNoTestFound.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
import { TestRunData } from './types';
|
||||
export default function getNoTestFound(testRunData: TestRunData, globalConfig: Config.GlobalConfig): string;
|
||||
//# sourceMappingURL=getNoTestFound.d.ts.map
|
1
node_modules/@jest/core/build/getNoTestFound.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/getNoTestFound.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"getNoTestFound.d.ts","sourceRoot":"","sources":["../src/getNoTestFound.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAGpC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,MAAM,CAAC,YAAY,GAChC,MAAM,CAgCR"}
|
63
node_modules/@jest/core/build/getNoTestFound.js
generated
vendored
Normal file
63
node_modules/@jest/core/build/getNoTestFound.js
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = getNoTestFound;
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _pluralize = _interopRequireDefault(require('./pluralize'));
|
||||
|
||||
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.
|
||||
*/
|
||||
function getNoTestFound(testRunData, globalConfig) {
|
||||
const testFiles = testRunData.reduce(
|
||||
(current, testRun) => current + (testRun.matches.total || 0),
|
||||
0
|
||||
);
|
||||
let dataMessage;
|
||||
|
||||
if (globalConfig.runTestsByPath) {
|
||||
dataMessage = `Files: ${globalConfig.nonFlagArgs
|
||||
.map(p => `"${p}"`)
|
||||
.join(', ')}`;
|
||||
} else {
|
||||
dataMessage = `Pattern: ${_chalk().default.yellow(
|
||||
globalConfig.testPathPattern
|
||||
)} - 0 matches`;
|
||||
}
|
||||
|
||||
return (
|
||||
_chalk().default.bold('No tests found, exiting with code 1') +
|
||||
'\n' +
|
||||
'Run with `--passWithNoTests` to exit with code 0' +
|
||||
'\n' +
|
||||
`In ${_chalk().default.bold(globalConfig.rootDir)}` +
|
||||
'\n' +
|
||||
` ${(0, _pluralize.default)('file', testFiles, 's')} checked across ${(0,
|
||||
_pluralize.default)(
|
||||
'project',
|
||||
testRunData.length,
|
||||
's'
|
||||
)}. Run with \`--verbose\` for more details.` +
|
||||
'\n' +
|
||||
dataMessage
|
||||
);
|
||||
}
|
8
node_modules/@jest/core/build/getNoTestFoundFailed.d.ts
generated
vendored
Normal file
8
node_modules/@jest/core/build/getNoTestFoundFailed.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 getNoTestFoundFailed(): string;
|
||||
//# sourceMappingURL=getNoTestFoundFailed.d.ts.map
|
1
node_modules/@jest/core/build/getNoTestFoundFailed.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/getNoTestFoundFailed.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"getNoTestFoundFailed.d.ts","sourceRoot":"","sources":["../src/getNoTestFoundFailed.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,OAAO,UAAU,oBAAoB,WAK3C"}
|
33
node_modules/@jest/core/build/getNoTestFoundFailed.js
generated
vendored
Normal file
33
node_modules/@jest/core/build/getNoTestFoundFailed.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = getNoTestFoundFailed;
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
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.
|
||||
*/
|
||||
function getNoTestFoundFailed() {
|
||||
return (
|
||||
_chalk().default.bold('No failed test found.\n') +
|
||||
_chalk().default.dim('Press `f` to quit "only failed tests" mode.')
|
||||
);
|
||||
}
|
8
node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts
generated
vendored
Normal file
8
node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.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 getNoTestFoundPassWithNoTests(): string;
|
||||
//# sourceMappingURL=getNoTestFoundPassWithNoTests.d.ts.map
|
1
node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"getNoTestFoundPassWithNoTests.d.ts","sourceRoot":"","sources":["../src/getNoTestFoundPassWithNoTests.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,OAAO,UAAU,6BAA6B,WAEpD"}
|
30
node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.js
generated
vendored
Normal file
30
node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.js
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = getNoTestFoundPassWithNoTests;
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
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.
|
||||
*/
|
||||
function getNoTestFoundPassWithNoTests() {
|
||||
return _chalk().default.bold('No tests found, exiting with code 0');
|
||||
}
|
9
node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts
generated
vendored
Normal file
9
node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.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 { Config } from '@jest/types';
|
||||
export default function getNoTestFoundRelatedToChangedFiles(globalConfig: Config.GlobalConfig): string;
|
||||
//# sourceMappingURL=getNoTestFoundRelatedToChangedFiles.d.ts.map
|
1
node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"getNoTestFoundRelatedToChangedFiles.d.ts","sourceRoot":"","sources":["../src/getNoTestFoundRelatedToChangedFiles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,MAAM,CAAC,OAAO,UAAU,mCAAmC,CACzD,YAAY,EAAE,MAAM,CAAC,YAAY,UAiBlC"}
|
57
node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.js
generated
vendored
Normal file
57
node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = getNoTestFoundRelatedToChangedFiles;
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestUtil() {
|
||||
const data = require('jest-util');
|
||||
|
||||
_jestUtil = function _jestUtil() {
|
||||
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.
|
||||
*/
|
||||
function getNoTestFoundRelatedToChangedFiles(globalConfig) {
|
||||
const ref = globalConfig.changedSince
|
||||
? `"${globalConfig.changedSince}"`
|
||||
: 'last commit';
|
||||
|
||||
let msg = _chalk().default.bold(
|
||||
`No tests found related to files changed since ${ref}.`
|
||||
);
|
||||
|
||||
if (_jestUtil().isInteractive) {
|
||||
msg += _chalk().default.dim(
|
||||
'\n' +
|
||||
(globalConfig.watch
|
||||
? 'Press `a` to run all tests, or run Jest with `--watchAll`.'
|
||||
: 'Run Jest without `-o` or with `--all` to run all tests.')
|
||||
);
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
10
node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts
generated
vendored
Normal file
10
node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
import { TestRunData } from './types';
|
||||
export default function getNoTestFoundVerbose(testRunData: TestRunData, globalConfig: Config.GlobalConfig): string;
|
||||
//# sourceMappingURL=getNoTestFoundVerbose.d.ts.map
|
1
node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"getNoTestFoundVerbose.d.ts","sourceRoot":"","sources":["../src/getNoTestFoundVerbose.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAQ,WAAW,EAAC,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,MAAM,CAAC,YAAY,GAChC,MAAM,CAqDR"}
|
95
node_modules/@jest/core/build/getNoTestFoundVerbose.js
generated
vendored
Normal file
95
node_modules/@jest/core/build/getNoTestFoundVerbose.js
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = getNoTestFoundVerbose;
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _pluralize = _interopRequireDefault(require('./pluralize'));
|
||||
|
||||
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.
|
||||
*/
|
||||
function getNoTestFoundVerbose(testRunData, globalConfig) {
|
||||
const individualResults = testRunData.map(testRun => {
|
||||
const stats = testRun.matches.stats || {};
|
||||
const config = testRun.context.config;
|
||||
const statsMessage = Object.keys(stats)
|
||||
.map(key => {
|
||||
if (key === 'roots' && config.roots.length === 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const value = config[key];
|
||||
|
||||
if (value) {
|
||||
const valueAsString = Array.isArray(value)
|
||||
? value.join(', ')
|
||||
: String(value);
|
||||
const matches = (0, _pluralize.default)(
|
||||
'match',
|
||||
stats[key] || 0,
|
||||
'es'
|
||||
);
|
||||
return ` ${key}: ${_chalk().default.yellow(
|
||||
valueAsString
|
||||
)} - ${matches}`;
|
||||
}
|
||||
|
||||
return null;
|
||||
})
|
||||
.filter(line => line)
|
||||
.join('\n');
|
||||
return testRun.matches.total
|
||||
? `In ${_chalk().default.bold(config.rootDir)}\n` +
|
||||
` ${(0, _pluralize.default)(
|
||||
'file',
|
||||
testRun.matches.total || 0,
|
||||
's'
|
||||
)} checked.\n` +
|
||||
statsMessage
|
||||
: `No files found in ${config.rootDir}.\n` +
|
||||
`Make sure Jest's configuration does not exclude this directory.` +
|
||||
`\nTo set up Jest, make sure a package.json file exists.\n` +
|
||||
`Jest Documentation: ` +
|
||||
`facebook.github.io/jest/docs/configuration.html`;
|
||||
});
|
||||
let dataMessage;
|
||||
|
||||
if (globalConfig.runTestsByPath) {
|
||||
dataMessage = `Files: ${globalConfig.nonFlagArgs
|
||||
.map(p => `"${p}"`)
|
||||
.join(', ')}`;
|
||||
} else {
|
||||
dataMessage = `Pattern: ${_chalk().default.yellow(
|
||||
globalConfig.testPathPattern
|
||||
)} - 0 matches`;
|
||||
}
|
||||
|
||||
return (
|
||||
_chalk().default.bold('No tests found, exiting with code 1') +
|
||||
'\n' +
|
||||
'Run with `--passWithNoTests` to exit with code 0' +
|
||||
'\n' +
|
||||
individualResults.join('\n') +
|
||||
'\n' +
|
||||
dataMessage
|
||||
);
|
||||
}
|
10
node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts
generated
vendored
Normal file
10
node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
import { TestRunData } from './types';
|
||||
export default function getNoTestsFoundMessage(testRunData: TestRunData, globalConfig: Config.GlobalConfig): string;
|
||||
//# sourceMappingURL=getNoTestsFoundMessage.d.ts.map
|
1
node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"getNoTestsFoundMessage.d.ts","sourceRoot":"","sources":["../src/getNoTestsFoundMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAOpC,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,MAAM,CAAC,YAAY,GAChC,MAAM,CAaR"}
|
52
node_modules/@jest/core/build/getNoTestsFoundMessage.js
generated
vendored
Normal file
52
node_modules/@jest/core/build/getNoTestsFoundMessage.js
generated
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = getNoTestsFoundMessage;
|
||||
|
||||
var _getNoTestFound = _interopRequireDefault(require('./getNoTestFound'));
|
||||
|
||||
var _getNoTestFoundRelatedToChangedFiles = _interopRequireDefault(
|
||||
require('./getNoTestFoundRelatedToChangedFiles')
|
||||
);
|
||||
|
||||
var _getNoTestFoundVerbose = _interopRequireDefault(
|
||||
require('./getNoTestFoundVerbose')
|
||||
);
|
||||
|
||||
var _getNoTestFoundFailed = _interopRequireDefault(
|
||||
require('./getNoTestFoundFailed')
|
||||
);
|
||||
|
||||
var _getNoTestFoundPassWithNoTests = _interopRequireDefault(
|
||||
require('./getNoTestFoundPassWithNoTests')
|
||||
);
|
||||
|
||||
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.
|
||||
*/
|
||||
function getNoTestsFoundMessage(testRunData, globalConfig) {
|
||||
if (globalConfig.onlyFailures) {
|
||||
return (0, _getNoTestFoundFailed.default)();
|
||||
}
|
||||
|
||||
if (globalConfig.onlyChanged) {
|
||||
return (0, _getNoTestFoundRelatedToChangedFiles.default)(globalConfig);
|
||||
}
|
||||
|
||||
if (globalConfig.passWithNoTests) {
|
||||
return (0, _getNoTestFoundPassWithNoTests.default)();
|
||||
}
|
||||
|
||||
return testRunData.length === 1 || globalConfig.verbose
|
||||
? (0, _getNoTestFoundVerbose.default)(testRunData, globalConfig)
|
||||
: (0, _getNoTestFound.default)(testRunData, globalConfig);
|
||||
}
|
12
node_modules/@jest/core/build/jest.d.ts
generated
vendored
Normal file
12
node_modules/@jest/core/build/jest.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* 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 as SearchSource } from './SearchSource';
|
||||
export { default as TestScheduler } from './TestScheduler';
|
||||
export { default as TestWatcher } from './TestWatcher';
|
||||
export { runCLI } from './cli';
|
||||
export { default as getVersion } from './version';
|
||||
//# sourceMappingURL=jest.d.ts.map
|
1
node_modules/@jest/core/build/jest.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/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,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,MAAM,EAAC,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,WAAW,CAAC"}
|
49
node_modules/@jest/core/build/jest.js
generated
vendored
Normal file
49
node_modules/@jest/core/build/jest.js
generated
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, 'SearchSource', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _SearchSource.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'TestScheduler', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _TestScheduler.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'TestWatcher', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _TestWatcher.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'runCLI', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _cli.runCLI;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'getVersion', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _version.default;
|
||||
}
|
||||
});
|
||||
|
||||
var _SearchSource = _interopRequireDefault(require('./SearchSource'));
|
||||
|
||||
var _TestScheduler = _interopRequireDefault(require('./TestScheduler'));
|
||||
|
||||
var _TestWatcher = _interopRequireDefault(require('./TestWatcher'));
|
||||
|
||||
var _cli = require('./cli');
|
||||
|
||||
var _version = _interopRequireDefault(require('./version'));
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
10
node_modules/@jest/core/build/lib/active_filters_message.d.ts
generated
vendored
Normal file
10
node_modules/@jest/core/build/lib/active_filters_message.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
declare const activeFilters: (globalConfig: Config.GlobalConfig, delimiter?: string) => string;
|
||||
export default activeFilters;
|
||||
//# sourceMappingURL=active_filters_message.d.ts.map
|
1
node_modules/@jest/core/build/lib/active_filters_message.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/lib/active_filters_message.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"active_filters_message.d.ts","sourceRoot":"","sources":["../../src/lib/active_filters_message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,QAAA,MAAM,aAAa,mEAuBlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
55
node_modules/@jest/core/build/lib/active_filters_message.js
generated
vendored
Normal file
55
node_modules/@jest/core/build/lib/active_filters_message.js
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
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 activeFilters = (globalConfig, delimiter = '\n') => {
|
||||
const testNamePattern = globalConfig.testNamePattern,
|
||||
testPathPattern = globalConfig.testPathPattern;
|
||||
|
||||
if (testNamePattern || testPathPattern) {
|
||||
const filters = [
|
||||
testPathPattern
|
||||
? _chalk().default.dim('filename ') +
|
||||
_chalk().default.yellow('/' + testPathPattern + '/')
|
||||
: null,
|
||||
testNamePattern
|
||||
? _chalk().default.dim('test name ') +
|
||||
_chalk().default.yellow('/' + testNamePattern + '/')
|
||||
: null
|
||||
]
|
||||
.filter(f => f)
|
||||
.join(', ');
|
||||
const messages = [
|
||||
'\n' + _chalk().default.bold('Active Filters: ') + filters
|
||||
];
|
||||
return messages.filter(message => !!message).join(delimiter);
|
||||
}
|
||||
|
||||
return '';
|
||||
};
|
||||
|
||||
var _default = activeFilters;
|
||||
exports.default = _default;
|
10
node_modules/@jest/core/build/lib/create_context.d.ts
generated
vendored
Normal file
10
node_modules/@jest/core/build/lib/create_context.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import { Config } from '@jest/types';
|
||||
declare const _default: (config: Config.ProjectConfig, { hasteFS, moduleMap }: import("jest-haste-map/build/types").HasteMap) => import("jest-runtime/build/types").Context;
|
||||
export default _default;
|
||||
//# sourceMappingURL=create_context.d.ts.map
|
1
node_modules/@jest/core/build/lib/create_context.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/lib/create_context.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"create_context.d.ts","sourceRoot":"","sources":["../../src/lib/create_context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;AAInC,wBAQG"}
|
35
node_modules/@jest/core/build/lib/create_context.js
generated
vendored
Normal file
35
node_modules/@jest/core/build/lib/create_context.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestRuntime() {
|
||||
const data = _interopRequireDefault(require('jest-runtime'));
|
||||
|
||||
_jestRuntime = function _jestRuntime() {
|
||||
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.
|
||||
*/
|
||||
var _default = (config, {hasteFS, moduleMap}) => ({
|
||||
config,
|
||||
hasteFS,
|
||||
moduleMap,
|
||||
resolver: _jestRuntime().default.createResolver(config, moduleMap)
|
||||
});
|
||||
|
||||
exports.default = _default;
|
10
node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts
generated
vendored
Normal file
10
node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
declare const _default: (pipe: NodeJS.WriteStream, stdin?: NodeJS.ReadStream) => Promise<void>;
|
||||
export default _default;
|
||||
//# sourceMappingURL=handle_deprecation_warnings.d.ts.map
|
1
node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"handle_deprecation_warnings.d.ts","sourceRoot":"","sources":["../../src/lib/handle_deprecation_warnings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAKH,wBA6BK"}
|
72
node_modules/@jest/core/build/lib/handle_deprecation_warnings.js
generated
vendored
Normal file
72
node_modules/@jest/core/build/lib/handle_deprecation_warnings.js
generated
vendored
Normal file
|
@ -0,0 +1,72 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestWatcher() {
|
||||
const data = require('jest-watcher');
|
||||
|
||||
_jestWatcher = function _jestWatcher() {
|
||||
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.
|
||||
*/
|
||||
var _default = (pipe, stdin = process.stdin) =>
|
||||
new Promise((resolve, reject) => {
|
||||
if (typeof stdin.setRawMode === 'function') {
|
||||
const messages = [
|
||||
_chalk().default.red('There are deprecation warnings.\n'),
|
||||
_chalk().default.dim(' \u203A Press ') +
|
||||
'Enter' +
|
||||
_chalk().default.dim(' to continue.'),
|
||||
_chalk().default.dim(' \u203A Press ') +
|
||||
'Esc' +
|
||||
_chalk().default.dim(' to exit.')
|
||||
];
|
||||
pipe.write(messages.join('\n'));
|
||||
stdin.setRawMode(true);
|
||||
stdin.resume();
|
||||
stdin.setEncoding('utf8');
|
||||
stdin.on('data', key => {
|
||||
if (key === _jestWatcher().KEYS.ENTER) {
|
||||
resolve();
|
||||
} else if (
|
||||
[
|
||||
_jestWatcher().KEYS.ESCAPE,
|
||||
_jestWatcher().KEYS.CONTROL_C,
|
||||
_jestWatcher().KEYS.CONTROL_D
|
||||
].indexOf(key) !== -1
|
||||
) {
|
||||
reject();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
|
||||
exports.default = _default;
|
9
node_modules/@jest/core/build/lib/is_valid_path.d.ts
generated
vendored
Normal file
9
node_modules/@jest/core/build/lib/is_valid_path.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 { Config } from '@jest/types';
|
||||
export default function isValidPath(globalConfig: Config.GlobalConfig, filePath: Config.Path): boolean;
|
||||
//# sourceMappingURL=is_valid_path.d.ts.map
|
1
node_modules/@jest/core/build/lib/is_valid_path.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/lib/is_valid_path.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"is_valid_path.d.ts","sourceRoot":"","sources":["../../src/lib/is_valid_path.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,QAAQ,EAAE,MAAM,CAAC,IAAI,WAMtB"}
|
29
node_modules/@jest/core/build/lib/is_valid_path.js
generated
vendored
Normal file
29
node_modules/@jest/core/build/lib/is_valid_path.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = isValidPath;
|
||||
|
||||
function _jestSnapshot() {
|
||||
const data = require('jest-snapshot');
|
||||
|
||||
_jestSnapshot = function _jestSnapshot() {
|
||||
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.
|
||||
*/
|
||||
function isValidPath(globalConfig, filePath) {
|
||||
return (
|
||||
!filePath.includes(globalConfig.coverageDirectory) &&
|
||||
!(0, _jestSnapshot().isSnapshotPath)(filePath)
|
||||
);
|
||||
}
|
10
node_modules/@jest/core/build/lib/log_debug_messages.d.ts
generated
vendored
Normal file
10
node_modules/@jest/core/build/lib/log_debug_messages.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
import { Config } from '@jest/types';
|
||||
export default function logDebugMessages(globalConfig: Config.GlobalConfig, configs: Array<Config.ProjectConfig> | Config.ProjectConfig, outputStream: NodeJS.WriteStream): void;
|
||||
//# sourceMappingURL=log_debug_messages.d.ts.map
|
1
node_modules/@jest/core/build/lib/log_debug_messages.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/lib/log_debug_messages.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"log_debug_messages.d.ts","sourceRoot":"","sources":["../../src/lib/log_debug_messages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,aAAa,EAC3D,YAAY,EAAE,MAAM,CAAC,WAAW,GAC/B,IAAI,CAON"}
|
23
node_modules/@jest/core/build/lib/log_debug_messages.js
generated
vendored
Normal file
23
node_modules/@jest/core/build/lib/log_debug_messages.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = logDebugMessages;
|
||||
|
||||
/**
|
||||
* 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 VERSION = require('../../package.json').version;
|
||||
|
||||
function logDebugMessages(globalConfig, configs, outputStream) {
|
||||
const output = {
|
||||
configs,
|
||||
globalConfig,
|
||||
version: VERSION
|
||||
};
|
||||
outputStream.write(JSON.stringify(output, null, ' ') + '\n');
|
||||
}
|
12
node_modules/@jest/core/build/lib/update_global_config.d.ts
generated
vendored
Normal file
12
node_modules/@jest/core/build/lib/update_global_config.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* 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';
|
||||
declare const _default: (globalConfig: Config.GlobalConfig, options?: Partial<Pick<Config.GlobalConfig, "bail" | "changedSince" | "collectCoverage" | "collectCoverageFrom" | "collectCoverageOnlyFrom" | "coverageDirectory" | "coverageReporters" | "notify" | "notifyMode" | "onlyFailures" | "reporters" | "testNamePattern" | "testPathPattern" | "updateSnapshot" | "verbose"> & {
|
||||
mode: "watch" | "watchAll";
|
||||
}> & Partial<Pick<Config.GlobalConfig, "noSCM" | "passWithNoTests">>) => Config.GlobalConfig;
|
||||
export default _default;
|
||||
//# sourceMappingURL=update_global_config.d.ts.map
|
1
node_modules/@jest/core/build/lib/update_global_config.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/lib/update_global_config.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"update_global_config.d.ts","sourceRoot":"","sources":["../../src/lib/update_global_config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;;;AAOnC,wBA4FE"}
|
142
node_modules/@jest/core/build/lib/update_global_config.js
generated
vendored
Normal file
142
node_modules/@jest/core/build/lib/update_global_config.js
generated
vendored
Normal file
|
@ -0,0 +1,142 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestRegexUtil() {
|
||||
const data = require('jest-regex-util');
|
||||
|
||||
_jestRegexUtil = function _jestRegexUtil() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
var _default = (globalConfig, options = {}) => {
|
||||
const newConfig = _objectSpread({}, globalConfig);
|
||||
|
||||
if (options.mode === 'watch') {
|
||||
newConfig.watch = true;
|
||||
newConfig.watchAll = false;
|
||||
} else if (options.mode === 'watchAll') {
|
||||
newConfig.watch = false;
|
||||
newConfig.watchAll = true;
|
||||
}
|
||||
|
||||
if (options.testNamePattern !== undefined) {
|
||||
newConfig.testNamePattern = options.testNamePattern || '';
|
||||
}
|
||||
|
||||
if (options.testPathPattern !== undefined) {
|
||||
newConfig.testPathPattern =
|
||||
(0, _jestRegexUtil().replacePathSepForRegex)(options.testPathPattern) ||
|
||||
'';
|
||||
}
|
||||
|
||||
newConfig.onlyChanged = false;
|
||||
newConfig.onlyChanged =
|
||||
!newConfig.watchAll &&
|
||||
!newConfig.testNamePattern &&
|
||||
!newConfig.testPathPattern;
|
||||
|
||||
if (typeof options.bail === 'boolean') {
|
||||
newConfig.bail = options.bail ? 1 : 0;
|
||||
} else if (options.bail !== undefined) {
|
||||
newConfig.bail = options.bail;
|
||||
}
|
||||
|
||||
if (options.changedSince !== undefined) {
|
||||
newConfig.changedSince = options.changedSince;
|
||||
}
|
||||
|
||||
if (options.collectCoverage !== undefined) {
|
||||
newConfig.collectCoverage = options.collectCoverage || false;
|
||||
}
|
||||
|
||||
if (options.collectCoverageFrom !== undefined) {
|
||||
newConfig.collectCoverageFrom = options.collectCoverageFrom;
|
||||
}
|
||||
|
||||
if (options.collectCoverageOnlyFrom !== undefined) {
|
||||
newConfig.collectCoverageOnlyFrom = options.collectCoverageOnlyFrom;
|
||||
}
|
||||
|
||||
if (options.coverageDirectory !== undefined) {
|
||||
newConfig.coverageDirectory = options.coverageDirectory;
|
||||
}
|
||||
|
||||
if (options.coverageReporters !== undefined) {
|
||||
newConfig.coverageReporters = options.coverageReporters;
|
||||
}
|
||||
|
||||
if (options.noSCM) {
|
||||
newConfig.noSCM = true;
|
||||
}
|
||||
|
||||
if (options.notify !== undefined) {
|
||||
newConfig.notify = options.notify || false;
|
||||
}
|
||||
|
||||
if (options.notifyMode !== undefined) {
|
||||
newConfig.notifyMode = options.notifyMode;
|
||||
}
|
||||
|
||||
if (options.onlyFailures !== undefined) {
|
||||
newConfig.onlyFailures = options.onlyFailures || false;
|
||||
}
|
||||
|
||||
if (options.passWithNoTests !== undefined) {
|
||||
newConfig.passWithNoTests = true;
|
||||
}
|
||||
|
||||
if (options.reporters !== undefined) {
|
||||
newConfig.reporters = options.reporters;
|
||||
}
|
||||
|
||||
if (options.updateSnapshot !== undefined) {
|
||||
newConfig.updateSnapshot = options.updateSnapshot;
|
||||
}
|
||||
|
||||
if (options.verbose !== undefined) {
|
||||
newConfig.verbose = options.verbose || false;
|
||||
}
|
||||
|
||||
return Object.freeze(newConfig);
|
||||
};
|
||||
|
||||
exports.default = _default;
|
11
node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts
generated
vendored
Normal file
11
node_modules/@jest/core/build/lib/watch_plugins_helpers.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 { Config } from '@jest/types';
|
||||
import { WatchPlugin, UsageData } from 'jest-watcher';
|
||||
export declare const filterInteractivePlugins: (watchPlugins: WatchPlugin[], globalConfig: Config.GlobalConfig) => WatchPlugin[];
|
||||
export declare const getSortedUsageRows: (watchPlugins: WatchPlugin[], globalConfig: Config.GlobalConfig) => UsageData[];
|
||||
//# sourceMappingURL=watch_plugins_helpers.d.ts.map
|
1
node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"watch_plugins_helpers.d.ts","sourceRoot":"","sources":["../../src/lib/watch_plugins_helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,wBAAwB,mFAiBpC,CAAC;AAMF,eAAO,MAAM,kBAAkB,iFAyBV,CAAC"}
|
62
node_modules/@jest/core/build/lib/watch_plugins_helpers.js
generated
vendored
Normal file
62
node_modules/@jest/core/build/lib/watch_plugins_helpers.js
generated
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.getSortedUsageRows = exports.filterInteractivePlugins = 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 filterInteractivePlugins = (watchPlugins, globalConfig) => {
|
||||
const usageInfos = watchPlugins.map(
|
||||
p => p.getUsageInfo && p.getUsageInfo(globalConfig)
|
||||
);
|
||||
return watchPlugins.filter((_plugin, i) => {
|
||||
const usageInfo = usageInfos[i];
|
||||
|
||||
if (usageInfo) {
|
||||
const key = usageInfo.key;
|
||||
return !usageInfos.slice(i + 1).some(u => !!u && key === u.key);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
exports.filterInteractivePlugins = filterInteractivePlugins;
|
||||
|
||||
function notEmpty(value) {
|
||||
return value != null;
|
||||
}
|
||||
|
||||
const getSortedUsageRows = (watchPlugins, globalConfig) =>
|
||||
filterInteractivePlugins(watchPlugins, globalConfig)
|
||||
.sort((a, b) => {
|
||||
if (a.isInternal && b.isInternal) {
|
||||
// internal plugins in the order we specify them
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (a.isInternal !== b.isInternal) {
|
||||
// external plugins afterwards
|
||||
return a.isInternal ? -1 : 1;
|
||||
}
|
||||
|
||||
const usageInfoA = a.getUsageInfo && a.getUsageInfo(globalConfig);
|
||||
const usageInfoB = b.getUsageInfo && b.getUsageInfo(globalConfig);
|
||||
|
||||
if (usageInfoA && usageInfoB) {
|
||||
// external plugins in alphabetical order
|
||||
return usageInfoA.key.localeCompare(usageInfoB.key);
|
||||
}
|
||||
|
||||
return 0;
|
||||
})
|
||||
.map(p => p.getUsageInfo && p.getUsageInfo(globalConfig))
|
||||
.filter(notEmpty);
|
||||
|
||||
exports.getSortedUsageRows = getSortedUsageRows;
|
22
node_modules/@jest/core/build/plugins/quit.d.ts
generated
vendored
Normal file
22
node_modules/@jest/core/build/plugins/quit.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* 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 } from 'jest-watcher';
|
||||
declare class QuitPlugin extends BaseWatchPlugin {
|
||||
isInternal: true;
|
||||
constructor(options: {
|
||||
stdin: NodeJS.ReadStream;
|
||||
stdout: NodeJS.WriteStream;
|
||||
});
|
||||
run(): Promise<void>;
|
||||
getUsageInfo(): {
|
||||
key: string;
|
||||
prompt: string;
|
||||
};
|
||||
}
|
||||
export default QuitPlugin;
|
||||
//# sourceMappingURL=quit.d.ts.map
|
1
node_modules/@jest/core/build/plugins/quit.d.ts.map
generated
vendored
Normal file
1
node_modules/@jest/core/build/plugins/quit.d.ts.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"quit.d.ts","sourceRoot":"","sources":["../../src/plugins/quit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAE7C,cAAM,UAAW,SAAQ,eAAe;IACtC,UAAU,EAAE,IAAI,CAAC;gBAEL,OAAO,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAA;KAAC;IAKrE,GAAG;IAQT,YAAY;;;;CAMb;AAED,eAAe,UAAU,CAAC"}
|
96
node_modules/@jest/core/build/plugins/quit.js
generated
vendored
Normal file
96
node_modules/@jest/core/build/plugins/quit.js
generated
vendored
Normal file
|
@ -0,0 +1,96 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function _jestWatcher() {
|
||||
const data = require('jest-watcher');
|
||||
|
||||
_jestWatcher = function _jestWatcher() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
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 _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;
|
||||
}
|
||||
|
||||
run() {
|
||||
var _this = this;
|
||||
|
||||
return _asyncToGenerator(function*() {
|
||||
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;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue