prepend user-content anchor

This commit is contained in:
Pierre Chalamet 2024-06-29 22:32:56 +02:00
parent 5c90b26631
commit 0dee8ba699
18 changed files with 36 additions and 36 deletions

4
dist/index.js generated vendored
View file

@ -1845,7 +1845,7 @@ function getBadge(passed, failed, skipped, options) {
}
const hint = failed > 0 ? 'Tests failed' : 'Tests passed successfully';
const uri = encodeURIComponent(`${options.badgeTitle}-${message}-${color}`);
return `[![${hint}](https://img.shields.io/badge/${uri})](#test-report)`;
return `[![${hint}](https://img.shields.io/badge/${uri})](#user-content-test-report)`;
}
function getTestRunsReport(testRuns, options) {
const sections = [];
@ -1854,7 +1854,7 @@ function getTestRunsReport(testRuns, options) {
sections.push(`<details><summary>Expand for details</summary>`);
sections.push(` `);
}
sections.push('# <a name="test-report"></a> Tests report');
sections.push('# <a name="user-content-test-report"></a> Tests report');
if (testRuns.length > 0 || options.onlySummary) {
const tableData = testRuns
.filter(tr => tr.passed > 0 || tr.failed > 0 || tr.skipped > 0)