chore(bidi): print all tests in csv report
This commit is contained in:
parent
04a3574f80
commit
85a39e0267
|
|
@ -47,19 +47,18 @@ class CsvReporter implements Reporter {
|
||||||
for (const test of file.allTests()) {
|
for (const test of file.allTests()) {
|
||||||
// Report fixme tests as failing.
|
// Report fixme tests as failing.
|
||||||
const fixme = test.annotations.find(a => a.type === 'fixme');
|
const fixme = test.annotations.find(a => a.type === 'fixme');
|
||||||
if (test.ok() && !fixme)
|
|
||||||
continue;
|
|
||||||
const row = [];
|
const row = [];
|
||||||
row.push(csvEscape(`${file.title} :: ${test.title}`));
|
row.push(csvEscape(`${file.title} :: ${test.title}`));
|
||||||
row.push(test.expectedStatus);
|
row.push(test.expectedStatus);
|
||||||
row.push(test.outcome());
|
row.push(test.outcome());
|
||||||
|
let errorMessage = '';
|
||||||
if (fixme) {
|
if (fixme) {
|
||||||
row.push('fixme' + (fixme.description ? `: ${fixme.description}` : ''));
|
errorMessage = 'fixme' + (fixme.description ? `: ${fixme.description}` : '');
|
||||||
} else {
|
} else {
|
||||||
const result = test.results.find(r => r.error);
|
const result = test.results.find(r => r.error);
|
||||||
const errorMessage = stripAnsi(result?.error?.message.replace(/\s+/g, ' ').trim().substring(0, 1024));
|
errorMessage = result?.error?.message.replace(/\s+/g, ' ').trim().substring(0, 1024) ?? '';
|
||||||
row.push(csvEscape(errorMessage ?? ''));
|
|
||||||
}
|
}
|
||||||
|
row.push(csvEscape(stripAnsi(errorMessage)));
|
||||||
rows.push(row);
|
rows.push(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue