CoverageReporter.d.ts 1010 B

123456789101112131415161718192021222324
  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, TestResult } from '@jest/test-result';
  8. import type { Config } from '@jest/types';
  9. import BaseReporter from './BaseReporter';
  10. import type { Context, CoverageReporterOptions, Test } from './types';
  11. export default class CoverageReporter extends BaseReporter {
  12. private _coverageMap;
  13. private _globalConfig;
  14. private _sourceMapStore;
  15. private _options;
  16. private _v8CoverageResults;
  17. static readonly filename: string;
  18. constructor(globalConfig: Config.GlobalConfig, options?: CoverageReporterOptions);
  19. onTestResult(_test: Test, testResult: TestResult): void;
  20. onRunComplete(contexts: Set<Context>, aggregatedResults: AggregatedResult): Promise<void>;
  21. private _addUntestedFiles;
  22. private _checkThreshold;
  23. private _getCoverageResult;
  24. }