Skip to content

Commit

Permalink
chore: make arguments to methods in base reporter optional (#9159)
Browse files Browse the repository at this point in the history
* chore: make arguemnts to methods in base reporter optional

* changelog
  • Loading branch information
SimenB authored and thymikee committed Nov 10, 2019
1 parent 8cb768e commit fe6ebba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -42,6 +42,7 @@
- `[jest-leak-detector]` [**BREAKING**] Use `weak-napi` instead of `weak` package ([#8686](https://github.com/facebook/jest/pull/8686))
- `[jest-mock]` Fix for mockReturnValue overriding mockImplementationOnce ([#8398](https://github.com/facebook/jest/pull/8398))
- `[jest-reporters]` Make node-notifier an optional dependency ([#8918](https://github.com/facebook/jest/pull/8918))
- `[jest-reporters]` Make all arguments to methods on `BaseReporter` optional ([#9159](https://github.com/facebook/jest/pull/9159))
- `[jest-resolve]`: Set MODULE_NOT_FOUND as error code when module is not resolved from paths ([#8487](https://github.com/facebook/jest/pull/8487))
- `[jest-snapshot]` Remove only the added newlines in multiline snapshots ([#8859](https://github.com/facebook/jest/pull/8859))
- `[jest-snapshot]` Distinguish empty string from external snapshot not written ([#8880](https://github.com/facebook/jest/pull/8880))
Expand Down
14 changes: 7 additions & 7 deletions packages/jest-reporters/src/base_reporter.ts
Expand Up @@ -18,21 +18,21 @@ export default class BaseReporter implements Reporter {
process.stderr.write(message + '\n');
}

onRunStart(_results: AggregatedResult, _options: ReporterOnStartOptions) {
onRunStart(_results?: AggregatedResult, _options?: ReporterOnStartOptions) {
preRunMessageRemove(process.stderr);
}

onTestResult(
_test: Test,
_testResult: TestResult,
_results: AggregatedResult,
_test?: Test,
_testResult?: TestResult,
_results?: AggregatedResult,
) {}

onTestStart(_test: Test) {}
onTestStart(_test?: Test) {}

onRunComplete(
_contexts: Set<Context>,
_aggregatedResults: AggregatedResult,
_contexts?: Set<Context>,
_aggregatedResults?: AggregatedResult,
): Promise<void> | void {}

protected _setError(error: Error) {
Expand Down

0 comments on commit fe6ebba

Please sign in to comment.