Skip to content

Commit 840a060

Browse files
committed
CustomReportErrorLog
1 parent 34624bc commit 840a060

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CustomReporterConfig.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import { Reporter, TestCase, TestError, TestResult, TestStep } from "@playwright/test/reporter";
22

3-
export default class CustomReporterConfig {
3+
export default class CustomReporterConfig implements Reporter {
44

55
onTestBegin(test: TestCase): void {
66
console.log(`Test Case Started : ${test.title}`);
77
}
88

9-
onTestEnd?(test: TestCase, result: TestResult): void {
9+
onTestEnd(test: TestCase, result: TestResult): void {
1010
console.log(`Test Case Completed : ${test.title} Status : ${result.status}`);
1111
}
1212

13-
onStepBegin?(test: TestCase, result: TestResult, step: TestStep): void {
13+
onStepBegin(test: TestCase, result: TestResult, step: TestStep): void {
1414
if (step.category === `test.step`) {
1515
console.log(`Executing Step : ${step.title}`);
1616
}
1717
}
1818

19-
onError(error: TestError) {
19+
onError(error: TestError): void {
2020
console.log(error.message);
2121
}
2222
}

0 commit comments

Comments
 (0)