Skip to content

Commit fe6ebba

Browse files
SimenBthymikee
authored andcommitted
chore: make arguments to methods in base reporter optional (#9159)
* chore: make arguemnts to methods in base reporter optional * changelog
1 parent 8cb768e commit fe6ebba

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
- `[jest-leak-detector]` [**BREAKING**] Use `weak-napi` instead of `weak` package ([#8686](https://github.com/facebook/jest/pull/8686))
4343
- `[jest-mock]` Fix for mockReturnValue overriding mockImplementationOnce ([#8398](https://github.com/facebook/jest/pull/8398))
4444
- `[jest-reporters]` Make node-notifier an optional dependency ([#8918](https://github.com/facebook/jest/pull/8918))
45+
- `[jest-reporters]` Make all arguments to methods on `BaseReporter` optional ([#9159](https://github.com/facebook/jest/pull/9159))
4546
- `[jest-resolve]`: Set MODULE_NOT_FOUND as error code when module is not resolved from paths ([#8487](https://github.com/facebook/jest/pull/8487))
4647
- `[jest-snapshot]` Remove only the added newlines in multiline snapshots ([#8859](https://github.com/facebook/jest/pull/8859))
4748
- `[jest-snapshot]` Distinguish empty string from external snapshot not written ([#8880](https://github.com/facebook/jest/pull/8880))

packages/jest-reporters/src/base_reporter.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ export default class BaseReporter implements Reporter {
1818
process.stderr.write(message + '\n');
1919
}
2020

21-
onRunStart(_results: AggregatedResult, _options: ReporterOnStartOptions) {
21+
onRunStart(_results?: AggregatedResult, _options?: ReporterOnStartOptions) {
2222
preRunMessageRemove(process.stderr);
2323
}
2424

2525
onTestResult(
26-
_test: Test,
27-
_testResult: TestResult,
28-
_results: AggregatedResult,
26+
_test?: Test,
27+
_testResult?: TestResult,
28+
_results?: AggregatedResult,
2929
) {}
3030

31-
onTestStart(_test: Test) {}
31+
onTestStart(_test?: Test) {}
3232

3333
onRunComplete(
34-
_contexts: Set<Context>,
35-
_aggregatedResults: AggregatedResult,
34+
_contexts?: Set<Context>,
35+
_aggregatedResults?: AggregatedResult,
3636
): Promise<void> | void {}
3737

3838
protected _setError(error: Error) {

0 commit comments

Comments
 (0)