DefaultReporter.d.ts 1.5 KB

12345678910111213141516171819202122232425262728293031
  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. import type { AggregatedResult, TestCaseResult, TestResult } from '@jest/test-result';
  8. import type { Config } from '@jest/types';
  9. import BaseReporter from './BaseReporter';
  10. import type { ReporterOnStartOptions, Test } from './types';
  11. export 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. constructor(globalConfig: Config.GlobalConfig);
  19. private _wrapStdio;
  20. forceFlushBufferedOutput(): void;
  21. private _clearStatus;
  22. private _printStatus;
  23. onRunStart(aggregatedResults: AggregatedResult, options: ReporterOnStartOptions): void;
  24. onTestStart(test: Test): void;
  25. onTestCaseResult(test: Test, testCaseResult: TestCaseResult): void;
  26. onRunComplete(): void;
  27. onTestResult(test: Test, testResult: TestResult, aggregatedResults: AggregatedResult): void;
  28. testFinished(config: Config.ProjectConfig, testResult: TestResult, aggregatedResults: AggregatedResult): void;
  29. printTestFileHeader(_testPath: Config.Path, config: Config.ProjectConfig, result: TestResult): void;
  30. printTestFileFailureMessage(_testPath: Config.Path, _config: Config.ProjectConfig, result: TestResult): void;
  31. }