Skip to content

Commit

Permalink
Marks Reporter's hooks as optional (#14433)
Browse files Browse the repository at this point in the history
  • Loading branch information
panteleevnikita committed Aug 21, 2023
1 parent 085f063 commit 8426b5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- `[jest-mock]` Revert [#13692](https://github.com/jestjs/jest/pull/13692) as it was a breaking change ([#14429](https://github.com/jestjs/jest/pull/14429))
- `[jest-mock]` Revert [#13866](https://github.com/jestjs/jest/pull/13866) as it was a breaking change ([#14429](https://github.com/jestjs/jest/pull/14429))
- `[jest-mock]` Revert [#13867](https://github.com/jestjs/jest/pull/13867) as it was a breaking change ([#14429](https://github.com/jestjs/jest/pull/14429))
- `[@jest/reporters]` Marks Reporter's hooks as optional ([#14433](https://github.com/jestjs/jest/pull/14433))

### Chore & Maintenance

Expand Down
6 changes: 3 additions & 3 deletions packages/jest-reporters/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ export interface Reporter {
test: Test,
testCaseResult: TestCaseResult,
) => Promise<void> | void;
readonly onRunStart: (
readonly onRunStart?: (
results: AggregatedResult,
options: ReporterOnStartOptions,
) => Promise<void> | void;
readonly onTestStart?: (test: Test) => Promise<void> | void;
readonly onTestFileStart?: (test: Test) => Promise<void> | void;
readonly onRunComplete: (
readonly onRunComplete?: (
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 8426b5d

Please sign in to comment.