Skip to content

Commit

Permalink
feat: added the skipped option to the testStartInfo of the `repor…
Browse files Browse the repository at this point in the history
…tTestStart` method (#7105)

* test: added skipped property in the expected value of the test

* feat: added skipped option for the reportTestStart
  • Loading branch information
Aleksey28 committed Jun 23, 2022
1 parent 73f6c2d commit 5558bc2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/reporter/index.ts
Expand Up @@ -484,7 +484,12 @@ export default class Reporter {
if (!testItem.pendingStarts) {
// @ts-ignore
if (this.plugin.reportTestStart) {
const testStartInfo = { testRunIds: testItem.testRunIds, testId: testItem.test.id, startTime: new Date(testItem.startTime) };
const testStartInfo = {
testRunIds: testItem.testRunIds,
testId: testItem.test.id,
startTime: new Date(testItem.startTime),
skipped: testItem.test.skip,
};

await this.dispatchToPlugin({
method: ReporterPluginMethod.reportTestStart as string,
Expand Down
8 changes: 8 additions & 0 deletions test/server/reporter-test.js
Expand Up @@ -702,6 +702,7 @@ describe('Reporter', () => {
'f1t1ff',
],
startTime: new Date('1970-01-01T00:00:00.000Z'),
skipped: false,
},
],
},
Expand Down Expand Up @@ -778,6 +779,7 @@ describe('Reporter', () => {
'f1t2ff',
],
startTime: new Date('1970-01-01T00:00:00.000Z'),
skipped: false,
},
],
},
Expand Down Expand Up @@ -862,6 +864,7 @@ describe('Reporter', () => {
'f1t3ff',
],
startTime: new Date('1970-01-01T00:00:00.000Z'),
skipped: false,
},
],
},
Expand Down Expand Up @@ -928,6 +931,7 @@ describe('Reporter', () => {
'f2t1ff',
],
startTime: new Date('1970-01-01T00:00:00.000Z'),
skipped: false,
},
],
},
Expand Down Expand Up @@ -984,6 +988,7 @@ describe('Reporter', () => {
'f2t2ff',
],
startTime: new Date('1970-01-01T00:00:00.000Z'),
skipped: false,
},
],
},
Expand Down Expand Up @@ -1048,6 +1053,7 @@ describe('Reporter', () => {
'f3t1ff',
],
startTime: new Date('1970-01-01T00:00:00.000Z'),
skipped: false,
},
],
},
Expand Down Expand Up @@ -1110,6 +1116,7 @@ describe('Reporter', () => {
'f3t2ff',
],
startTime: new Date('1970-01-01T00:00:00.000Z'),
skipped: true,
},
],
},
Expand Down Expand Up @@ -1166,6 +1173,7 @@ describe('Reporter', () => {
'f3t3ff',
],
startTime: new Date('1970-01-01T00:00:00.000Z'),
skipped: false,
},
],
},
Expand Down

0 comments on commit 5558bc2

Please sign in to comment.