UNPKG

968 BTypeScriptView 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 { Context, Reporter, ReporterOnStartOptions, Test } from './types';
9export default class BaseReporter implements Reporter {
10 private _error?;
11 log(message: string): void;
12 onRunStart(_results?: AggregatedResult, _options?: ReporterOnStartOptions): void;
13 onTestCaseResult(_test: Test, _testCaseResult: TestCaseResult): void;
14 onTestResult(_test?: Test, _testResult?: TestResult, _results?: AggregatedResult): void;
15 onTestStart(_test?: Test): void;
16 onRunComplete(_contexts?: Set<Context>, _aggregatedResults?: AggregatedResult): Promise<void> | void;
17 protected _setError(error: Error): void;
18 getLastError(): Error | undefined;
19}