Skip to content

Commit 51f3098

Browse files
committed
chore: Update reporter configuration property name #17
1 parent 0b6d355 commit 51f3098

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The reporter supports the following configuration options:
3838
| showAnnotations | Show annotations from tests | `true` |
3939
| showTags | Show tags from tests | `true` |
4040
| showError | Show error message in summary | `false` |
41-
| report | Define which types of test results should be shown in the summary | `['pass', 'skipped', 'fail', 'flaky']` |
41+
| includeResults | Define which types of test results should be shown in the summary | `['pass', 'skipped', 'fail', 'flaky']` |
4242
| quiet | Do not show any output in the console | `false` |
4343

4444
To use these option, you can update the reporter configuration:

playwright.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const config: PlaywrightTestConfig<{}, {}> = {
2020
useDetails: false,
2121
showError: true,
2222
quiet: false,
23-
report: ["fail", "flaky", "skipped"],
23+
includeResults: ["fail", "flaky", "skipped"],
2424
},
2525
],
2626
[
@@ -30,7 +30,7 @@ const config: PlaywrightTestConfig<{}, {}> = {
3030
useDetails: false,
3131
showError: true,
3232
quiet: false,
33-
report: ["pass", "skipped"],
33+
includeResults: ["pass", "skipped"],
3434
},
3535
],
3636
[
@@ -39,7 +39,7 @@ const config: PlaywrightTestConfig<{}, {}> = {
3939
title: "Reporter (details: true, report: fail, flaky, skipped)",
4040
useDetails: true,
4141
quiet: true,
42-
report: ["fail", "flaky", "skipped"],
42+
includeResults: ["fail", "flaky", "skipped"],
4343
},
4444
],
4545
],

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class GitHubAction implements Reporter {
3131
this.options.showTags = true;
3232
}
3333

34-
if (typeof options.report === "undefined") {
35-
this.options.report = ["fail", "flaky", "pass", "skipped"];
34+
if (typeof options.includeResults === "undefined") {
35+
this.options.includeResults = ["fail", "flaky", "pass", "skipped"];
3636
}
3737

3838
if (process.env.NODE_ENV === "development") {

src/models/GitHubActionOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export interface GitHubActionOptions {
77
showTags: boolean;
88
showError?: boolean;
99
quiet?: boolean;
10-
report?: DisplayLevel[];
10+
includeResults?: DisplayLevel[];
1111
}

src/utils/processResults.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const processResults = async (
5656
options.showAnnotations,
5757
options.showTags,
5858
!!options.showError,
59-
options.report as DisplayLevel[]
59+
options.includeResults as DisplayLevel[]
6060
);
6161

6262
if (!content) {
@@ -76,7 +76,7 @@ export const processResults = async (
7676
options.showAnnotations,
7777
options.showTags,
7878
!!options.showError,
79-
options.report as DisplayLevel[]
79+
options.includeResults as DisplayLevel[]
8080
);
8181

8282
if (tableRows.length !== 0) {

0 commit comments

Comments
 (0)