UNPKG

1.52 kBTypeScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7import type { AggregatedResult, TestCaseResult, TestResult } from '@jest/test-result';
8import type { Config } from '@jest/types';
9import BaseReporter from './BaseReporter';
10import type { ReporterOnStartOptions, Test } from './types';
11export default class DefaultReporter extends BaseReporter {
12 private _clear;
13 private _err;
14 protected _globalConfig: Config.GlobalConfig;
15 private _out;
16 private _status;
17 private _bufferedOutput;
18 static readonly filename: string;
19 constructor(globalConfig: Config.GlobalConfig);
20 private _wrapStdio;
21 forceFlushBufferedOutput(): void;
22 private _clearStatus;
23 private _printStatus;
24 onRunStart(aggregatedResults: AggregatedResult, options: ReporterOnStartOptions): void;
25 onTestStart(test: Test): void;
26 onTestCaseResult(test: Test, testCaseResult: TestCaseResult): void;
27 onRunComplete(): void;
28 onTestResult(test: Test, testResult: TestResult, aggregatedResults: AggregatedResult): void;
29 testFinished(config: Config.ProjectConfig, testResult: TestResult, aggregatedResults: AggregatedResult): void;
30 printTestFileHeader(_testPath: Config.Path, config: Config.ProjectConfig, result: TestResult): void;
31 printTestFileFailureMessage(_testPath: Config.Path, _config: Config.ProjectConfig, result: TestResult): void;
32}