mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 10:55:23 -08:00
Update README; use empty string as default
This commit is contained in:
committed by
Jozef Izso
parent
2b2d091d3d
commit
0f47a5bec1
8
dist/index.js
generated
vendored
8
dist/index.js
generated
vendored
@@ -1817,7 +1817,8 @@ const defaultOptions = {
|
||||
baseUrl: '',
|
||||
onlySummary: false,
|
||||
useActionsSummary: true,
|
||||
badgeTitle: 'tests'
|
||||
badgeTitle: 'tests',
|
||||
reportTitle: ''
|
||||
};
|
||||
function getReport(results, options = defaultOptions) {
|
||||
core.info('Generating check run summary');
|
||||
@@ -1880,9 +1881,8 @@ function getByteLength(text) {
|
||||
}
|
||||
function renderReport(results, options) {
|
||||
const sections = [];
|
||||
const { reportTitle } = options;
|
||||
// Suppress the report title for empty string or whitespace
|
||||
if (reportTitle && reportTitle.trim()) {
|
||||
const reportTitle = options.reportTitle.trim();
|
||||
if (reportTitle) {
|
||||
sections.push(`# ${reportTitle}`);
|
||||
}
|
||||
const badge = getReportBadge(results, options);
|
||||
|
||||
Reference in New Issue
Block a user