DefaultReporter.d.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233
  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. */
  7. /// <reference types="node" />
  8. import type { AggregatedResult, TestCaseResult, TestResult } from '@jest/test-result';
  9. import type { Config } from '@jest/types';
  10. import BaseReporter from './BaseReporter';
  11. import type { ReporterOnStartOptions, Test } from './types';
  12. export default class DefaultReporter extends BaseReporter {
  13. private _clear;
  14. private _err;
  15. protected _globalConfig: Config.GlobalConfig;
  16. private _out;
  17. private _status;
  18. private _bufferedOutput;
  19. static readonly filename: string;
  20. constructor(globalConfig: Config.GlobalConfig);
  21. protected __wrapStdio(stream: NodeJS.WritableStream | NodeJS.WriteStream): void;
  22. forceFlushBufferedOutput(): void;
  23. protected __clearStatus(): void;
  24. protected __printStatus(): void;
  25. onRunStart(aggregatedResults: AggregatedResult, options: ReporterOnStartOptions): void;
  26. onTestStart(test: Test): void;
  27. onTestCaseResult(test: Test, testCaseResult: TestCaseResult): void;
  28. onRunComplete(): void;
  29. onTestResult(test: Test, testResult: TestResult, aggregatedResults: AggregatedResult): void;
  30. testFinished(config: Config.ProjectConfig, testResult: TestResult, aggregatedResults: AggregatedResult): void;
  31. printTestFileHeader(_testPath: Config.Path, config: Config.ProjectConfig, result: TestResult): void;
  32. printTestFileFailureMessage(_testPath: Config.Path, _config: Config.ProjectConfig, result: TestResult): void;
  33. }