Skip to content

Commit

Permalink
Marks Reporter's hooks as optional
Browse files Browse the repository at this point in the history
onRunStart and getLastError should be optional
  • Loading branch information
panteleevnikita authored Aug 20, 2023
1 parent eb61702 commit 8b87509
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jest-reporters/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface Reporter {
test: Test,
testCaseResult: TestCaseResult,
) => Promise<void> | void;
readonly onRunStart: (
readonly onRunStart?: (
results: AggregatedResult,
options: ReporterOnStartOptions,
) => Promise<void> | void;
Expand All @@ -52,7 +52,7 @@ export interface Reporter {
testContexts: Set<TestContext>,
results: AggregatedResult,
) => Promise<void> | void;
readonly getLastError: () => Error | void;
readonly getLastError?: () => Error | void;
}

export type ReporterContext = {
Expand Down

0 comments on commit 8b87509

Please sign in to comment.