Skip to content

Commit 8b87509

Browse files
Marks Reporter's hooks as optional
onRunStart and getLastError should be optional
1 parent eb61702 commit 8b87509

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/jest-reporters/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export interface Reporter {
4242
test: Test,
4343
testCaseResult: TestCaseResult,
4444
) => Promise<void> | void;
45-
readonly onRunStart: (
45+
readonly onRunStart?: (
4646
results: AggregatedResult,
4747
options: ReporterOnStartOptions,
4848
) => Promise<void> | void;
@@ -52,7 +52,7 @@ export interface Reporter {
5252
testContexts: Set<TestContext>,
5353
results: AggregatedResult,
5454
) => Promise<void> | void;
55-
readonly getLastError: () => Error | void;
55+
readonly getLastError?: () => Error | void;
5656
}
5757

5858
export type ReporterContext = {

0 commit comments

Comments
 (0)