Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem-Babich committed Mar 20, 2023
1 parent afc2dd6 commit 39dfe7d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/reporter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ export default class Reporter {
reportItem.errs = reportItem.errs.concat(testRun.errs);
reportItem.warnings = testRun.warningLog ? union(reportItem.warnings, testRun.warningLog.messages) : [];
reportItem.reportData = reportItem.reportData || {};
reportItem.reportData[testRun.id] = testRun.reportDataLog.data;
reportItem.reportData[testRun.id] = testRun.reportDataLog ? testRun.reportDataLog.data : [];

if (testRun.quarantine) {
reportItem.quarantine = reportItem.quarantine || {};
Expand Down
42 changes: 33 additions & 9 deletions test/server/reporter-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,10 @@ describe('Reporter', () => {
run: 'run-001',
},
},
reportData: [],
reportData: {
'f1t1': [],
'f1t1ff': [],
},
},
{
run: 'run-001',
Expand Down Expand Up @@ -878,7 +881,10 @@ describe('Reporter', () => {
run: 'run-001',
},
},
reportData: [],
reportData: {
f1t2: [],
f1t2ff: [],
},
},
{
run: 'run-001',
Expand Down Expand Up @@ -944,7 +950,10 @@ describe('Reporter', () => {
run: 'run-001',
},
},
reportData: [],
reportData: {
f1t3: [],
f1t3ff: [],
},
},
{
run: 'run-001',
Expand Down Expand Up @@ -1020,7 +1029,10 @@ describe('Reporter', () => {
run: 'run-002',
},
},
reportData: [],
reportData: {
f2t1: [],
f2t1ff: [],
},
},
{
run: 'run-001',
Expand Down Expand Up @@ -1086,7 +1098,10 @@ describe('Reporter', () => {
run: 'run-002',
},
},
reportData: [],
reportData: {
f2t2: [],
f2t2ff: [],
},
},
{
run: 'run-001',
Expand Down Expand Up @@ -1164,7 +1179,10 @@ describe('Reporter', () => {
path: './file2.js',
meta: null,
},
reportData: [],
reportData: {
f3t1: [],
f3t1ff: [],
},
},
{
run: 'run-001',
Expand Down Expand Up @@ -1228,7 +1246,10 @@ describe('Reporter', () => {
path: './file2.js',
meta: null,
},
reportData: [],
reportData: {
f3t2: [],
f3t2ff: [],
},
},
{
run: 'run-001',
Expand Down Expand Up @@ -1292,7 +1313,10 @@ describe('Reporter', () => {
path: './file2.js',
meta: null,
},
reportData: [],
reportData: {
f3t3: [],
f3t3ff: [],
},
},
{
run: 'run-001',
Expand Down Expand Up @@ -1396,7 +1420,7 @@ describe('Reporter', () => {
[
{ testRunId: 'f1t2-id1', videoPath: 'f1t2-path1' },
{ testRunId: 'f1t2-id2', videoPath: 'f1t2-path2' },
]]
]],
);
});
});
Expand Down

0 comments on commit 39dfe7d

Please sign in to comment.