Status.d.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 { Config } from '@jest/types';
  8. import { AggregatedResult, TestResult } from '@jest/test-result';
  9. import { ReporterOnStartOptions } from './types';
  10. /**
  11. * A class that generates the CLI status of currently running tests
  12. * and also provides an ANSI escape sequence to remove status lines
  13. * from the terminal.
  14. */
  15. export default class Status {
  16. private _cache;
  17. private _callback?;
  18. private _currentTests;
  19. private _done;
  20. private _emitScheduled;
  21. private _estimatedTime;
  22. private _interval?;
  23. private _aggregatedResults?;
  24. private _showStatus;
  25. constructor();
  26. onChange(callback: () => void): void;
  27. runStarted(aggregatedResults: AggregatedResult, options: ReporterOnStartOptions): void;
  28. runFinished(): void;
  29. testStarted(testPath: Config.Path, config: Config.ProjectConfig): void;
  30. testFinished(_config: Config.ProjectConfig, testResult: TestResult, aggregatedResults: AggregatedResult): void;
  31. get(): {
  32. content: string;
  33. clear: string;
  34. };
  35. private _emit;
  36. private _debouncedEmit;
  37. private _tick;
  38. }
  39. //# sourceMappingURL=Status.d.ts.map