Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make arguments to methods in base reporter optional #9159

Merged
merged 2 commits into from
Nov 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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