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

Fix types of reporters runner hooks #5365

Merged
merged 9 commits into from May 6, 2020
4 changes: 2 additions & 2 deletions packages/wdio-reporter/reporter.d.ts
Expand Up @@ -5,7 +5,7 @@ declare namespace WDIOReporter {
class Reporter {
constructor (options: Options);

onRunnerStart(): void;
onRunnerStart(runner: any): void;
onBeforeCommand(command: BeforeCommand): void;
onAfterCommand(command: AfterCommand): void;
onScreenshot(): void;
Expand All @@ -18,7 +18,7 @@ declare namespace WDIOReporter {
onTestSkip(test: Test): void;
onTestEnd(test: Test): void;
onSuiteEnd(suite: Suite): void;
onRunnerEnd(): void;
onRunnerEnd(runner: any): void;

isSynchronised: boolean;

Expand Down
8 changes: 8 additions & 0 deletions tests/typings/webdriverio-reporter/reporter.ts
Expand Up @@ -60,6 +60,14 @@ class CustomReporter extends WDIOReporter {
constructor(options: WDIOReporter.Options) {
super(options)
}

onRunnerStart(runner: any) {
// Do things
}

onRunnerEnd(runner: any) {
// Do things
}
}

export default {}