This commit is contained in:
Yamozha
2021-04-02 02:24:13 +03:00
parent c23950b545
commit 7256d79e2c
31493 changed files with 3036630 additions and 0 deletions

40
node_modules/@jest/reporters/build/ts3.4/Status.d.ts generated vendored Normal file
View File

@ -0,0 +1,40 @@
/**
* 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 { AggregatedResult, TestResult } from '@jest/test-result';
import { ReporterOnStartOptions } from './types';
declare type Cache = {
content: string;
clear: string;
};
/**
* A class that generates the CLI status of currently running tests
* and also provides an ANSI escape sequence to remove status lines
* from the terminal.
*/
export default class Status {
private _cache;
private _callback?;
private _currentTests;
private _done;
private _emitScheduled;
private _estimatedTime;
private _interval?;
private _aggregatedResults?;
private _showStatus;
constructor();
onChange(callback: () => void): void;
runStarted(aggregatedResults: AggregatedResult, options: ReporterOnStartOptions): void;
runFinished(): void;
testStarted(testPath: Config.Path, config: Config.ProjectConfig): void;
testFinished(_config: Config.ProjectConfig, testResult: TestResult, aggregatedResults: AggregatedResult): void;
get(): Cache;
private _emit;
private _debouncedEmit;
private _tick;
}
export {};

View 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.
*/
import { AggregatedResult, TestResult } from '@jest/test-result';
import { Context, Reporter, ReporterOnStartOptions, Test } from './types';
export default class BaseReporter implements Reporter {
private _error?;
log(message: string): void;
onRunStart(_results?: AggregatedResult, _options?: ReporterOnStartOptions): void;
onTestResult(_test?: Test, _testResult?: TestResult, _results?: AggregatedResult): void;
onTestStart(_test?: Test): void;
onRunComplete(_contexts?: Set<Context>, _aggregatedResults?: AggregatedResult): Promise<void> | void;
protected _setError(error: Error): void;
getLastError(): Error | undefined;
}

View 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 { Config } from '@jest/types';
import { AggregatedResult, TestResult } from '@jest/test-result';
import BaseReporter from './base_reporter';
import { Context, CoverageReporterOptions, Test } from './types';
export default class CoverageReporter extends BaseReporter {
private _coverageMap;
private _globalConfig;
private _sourceMapStore;
private _options;
private _v8CoverageResults;
constructor(globalConfig: Config.GlobalConfig, options?: CoverageReporterOptions);
onTestResult(_test: Test, testResult: TestResult): void;
onRunComplete(contexts: Set<Context>, aggregatedResults: AggregatedResult): Promise<void>;
private _addUntestedFiles;
private _checkThreshold;
private _getCoverageResult;
}

View File

@ -0,0 +1,17 @@
/**
* 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 { CoverageReporterSerializedOptions } from './types';
import { CoverageWorkerResult } from './generateEmptyCoverage';
export declare type CoverageWorkerData = {
globalConfig: Config.GlobalConfig;
config: Config.ProjectConfig;
path: Config.Path;
options?: CoverageReporterSerializedOptions;
};
export { CoverageWorkerResult };
export declare function worker({ config, globalConfig, path, options, }: CoverageWorkerData): CoverageWorkerResult | null;

View File

@ -0,0 +1,30 @@
/**
* 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 { AggregatedResult, TestResult } from '@jest/test-result';
import { ReporterOnStartOptions, Test } from './types';
import BaseReporter from './base_reporter';
export default class DefaultReporter extends BaseReporter {
private _clear;
private _err;
protected _globalConfig: Config.GlobalConfig;
private _out;
private _status;
private _bufferedOutput;
constructor(globalConfig: Config.GlobalConfig);
private _wrapStdio;
forceFlushBufferedOutput(): void;
private _clearStatus;
private _printStatus;
onRunStart(aggregatedResults: AggregatedResult, options: ReporterOnStartOptions): void;
onTestStart(test: Test): void;
onRunComplete(): void;
onTestResult(test: Test, testResult: TestResult, aggregatedResults: AggregatedResult): void;
testFinished(config: Config.ProjectConfig, testResult: TestResult, aggregatedResults: AggregatedResult): void;
printTestFileHeader(_testPath: Config.Path, config: Config.ProjectConfig, result: TestResult): void;
printTestFileFailureMessage(_testPath: Config.Path, _config: Config.ProjectConfig, result: TestResult): void;
}

View File

@ -0,0 +1,19 @@
/**
* 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 { FileCoverage } from 'istanbul-lib-coverage';
import { V8Coverage } from 'collect-v8-coverage';
declare type SingleV8Coverage = V8Coverage[number];
export declare type CoverageWorkerResult = {
kind: 'BabelCoverage';
coverage: FileCoverage;
} | {
kind: 'V8Coverage';
result: SingleV8Coverage;
};
export default function (source: string, filename: Config.Path, globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, changedFiles?: Set<Config.Path>, sourcesRelatedToTestsInChangedFiles?: Set<Config.Path>): CoverageWorkerResult | null;
export {};

View 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 { TestResult } from '@jest/test-result';
declare const _default: (result: TestResult, globalConfig: Config.GlobalConfig, projectConfig?: Config.ProjectConfig | undefined) => string;
export default _default;

View 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.
*/
declare const _default: (snapshot: {
added: number;
fileDeleted: boolean;
matched: number;
unchecked: number;
uncheckedKeys: string[];
unmatched: number;
updated: number;
}, afterUpdate: boolean) => string[];
export default _default;

View 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 { SnapshotSummary } from '@jest/test-result';
declare const _default: (snapshots: SnapshotSummary, globalConfig: Config.GlobalConfig, updateCommand: string) => string[];
export default _default;

View 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';
import istanbulReport = require('istanbul-lib-report');
export default function getWatermarks(config: Config.GlobalConfig): istanbulReport.Watermarks;

18
node_modules/@jest/reporters/build/ts3.4/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,18 @@
export { Config } from '@jest/types';
export { AggregatedResult, SnapshotSummary, TestResult, } from '@jest/test-result';
export { default as BaseReporter } from './base_reporter';
export { default as CoverageReporter } from './coverage_reporter';
export { default as DefaultReporter } from './default_reporter';
export { default as NotifyReporter } from './notify_reporter';
export { default as SummaryReporter } from './summary_reporter';
export { default as VerboseReporter } from './verbose_reporter';
export { Context, Reporter, ReporterOnStartOptions, SummaryOptions, Test, } from './types';
export declare const utils: {
formatTestPath: (config: import("@jest/types/build/Config").GlobalConfig | import("@jest/types/build/Config").ProjectConfig, testPath: string) => string;
printDisplayName: (config: import("@jest/types/build/Config").ProjectConfig) => string;
relativePath: (config: import("@jest/types/build/Config").GlobalConfig | import("@jest/types/build/Config").ProjectConfig, testPath: string) => {
basename: string;
dirname: string;
};
trimAndFormatPath: (pad: number, config: import("@jest/types/build/Config").GlobalConfig | import("@jest/types/build/Config").ProjectConfig, testPath: string, columns: number) => string;
};

View 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.
*/
import { Config } from '@jest/types';
import { AggregatedResult } from '@jest/test-result';
import { Context, TestSchedulerContext } from './types';
import BaseReporter from './base_reporter';
export default class NotifyReporter extends BaseReporter {
private _notifier;
private _startRun;
private _globalConfig;
private _context;
constructor(globalConfig: Config.GlobalConfig, startRun: (globalConfig: Config.GlobalConfig) => any, context: TestSchedulerContext);
onRunComplete(contexts: Set<Context>, result: AggregatedResult): void;
}

View 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.
*/
import { Config } from '@jest/types';
import { AggregatedResult } from '@jest/test-result';
import { Context, ReporterOnStartOptions } from './types';
import BaseReporter from './base_reporter';
export default class SummaryReporter extends BaseReporter {
private _estimatedTime;
private _globalConfig;
constructor(globalConfig: Config.GlobalConfig);
private _write;
onRunStart(aggregatedResults: AggregatedResult, options: ReporterOnStartOptions): void;
onRunComplete(contexts: Set<Context>, aggregatedResults: AggregatedResult): void;
private _printSnapshotSummary;
private _printSummary;
private _getTestSummary;
}

68
node_modules/@jest/reporters/build/ts3.4/types.d.ts generated vendored Normal file
View File

@ -0,0 +1,68 @@
/**
* 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 { AggregatedResult, SerializableError, TestResult } from '@jest/test-result';
import { FS as HasteFS, ModuleMap } from 'jest-haste-map';
import HasteResolver = require('jest-resolve');
import { worker } from './coverage_worker';
export declare type ReporterOnStartOptions = {
estimatedTime: number;
showStatus: boolean;
};
export declare type Context = {
config: Config.ProjectConfig;
hasteFS: HasteFS;
moduleMap: ModuleMap;
resolver: HasteResolver;
};
export declare type Test = {
context: Context;
duration?: number;
path: Config.Path;
};
export declare type CoverageWorker = {
worker: typeof worker;
};
export declare type CoverageReporterOptions = {
changedFiles?: Set<Config.Path>;
sourcesRelatedToTestsInChangedFiles?: Set<Config.Path>;
};
export declare type CoverageReporterSerializedOptions = {
changedFiles?: Array<Config.Path>;
sourcesRelatedToTestsInChangedFiles?: Array<Config.Path>;
};
export declare type OnTestStart = (test: Test) => Promise<void>;
export declare type OnTestFailure = (test: Test, error: SerializableError) => Promise<any>;
export declare type OnTestSuccess = (test: Test, result: TestResult) => Promise<any>;
export interface Reporter {
readonly onTestResult: (test: Test, testResult: TestResult, aggregatedResult: AggregatedResult) => Promise<void> | void;
readonly onRunStart: (results: AggregatedResult, options: ReporterOnStartOptions) => Promise<void> | void;
readonly onTestStart: (test: Test) => Promise<void> | void;
readonly onRunComplete: (contexts: Set<Context>, results: AggregatedResult) => Promise<void> | void;
readonly getLastError: () => Error | void;
}
export declare type SummaryOptions = {
estimatedTime?: number;
roundTime?: boolean;
width?: number;
};
export declare type TestRunnerOptions = {
serial: boolean;
};
export declare type TestRunData = Array<{
context: Context;
matches: {
allTests: number;
tests: Array<Test>;
total: number;
};
}>;
export declare type TestSchedulerContext = {
firstRun: boolean;
previousSuccess: boolean;
changedFiles?: Set<Config.Path>;
};

18
node_modules/@jest/reporters/build/ts3.4/utils.d.ts generated vendored Normal file
View 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.
*/
import { Config } from '@jest/types';
import { AggregatedResult } from '@jest/test-result';
import { SummaryOptions } from './types';
export declare const printDisplayName: (config: Config.ProjectConfig) => string;
export declare const trimAndFormatPath: (pad: number, config: Config.GlobalConfig | Config.ProjectConfig, testPath: string, columns: number) => string;
export declare const formatTestPath: (config: Config.GlobalConfig | Config.ProjectConfig, testPath: string) => string;
export declare const relativePath: (config: Config.GlobalConfig | Config.ProjectConfig, testPath: string) => {
basename: string;
dirname: string;
};
export declare const getSummary: (aggregatedResults: AggregatedResult, options?: SummaryOptions | undefined) => string;
export declare const wrapAnsiString: (string: string, terminalWidth: number) => string;

View File

@ -0,0 +1,24 @@
/**
* 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 { AggregatedResult, AssertionResult, Suite, TestResult } from '@jest/test-result';
import { Test } from './types';
import DefaultReporter from './default_reporter';
export default class VerboseReporter extends DefaultReporter {
protected _globalConfig: Config.GlobalConfig;
constructor(globalConfig: Config.GlobalConfig);
static filterTestResults(testResults: Array<AssertionResult>): Array<AssertionResult>;
static groupTestsBySuites(testResults: Array<AssertionResult>): Suite;
onTestResult(test: Test, result: TestResult, aggregatedResults: AggregatedResult): void;
private _logTestResults;
private _logSuite;
private _getIcon;
private _logTest;
private _logTests;
private _logTodoOrPendingTest;
private _logLine;
}