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

View file

@ -1,5 +1,5 @@
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)](#test-report)
# <a name="test-report"></a> Tests report
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/dart-json.json|1 ✅|4 ❌|1 ⚪|4s|

View file

@ -1,5 +1,5 @@
[![Tests failed](https://img.shields.io/badge/tests-3%20passed%2C%205%20failed%2C%201%20skipped-critical)](#test-report)
# <a name="test-report"></a> Tests report
[![Tests failed](https://img.shields.io/badge/tests-3%20passed%2C%205%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/dotnet-nunit.xml|3 ✅|5 ❌|1 ⚪|230ms|

View file

@ -1,5 +1,5 @@
[![Tests failed](https://img.shields.io/badge/tests-5%20passed%2C%205%20failed%2C%201%20skipped-critical)](#test-report)
# <a name="test-report"></a> Tests report
[![Tests failed](https://img.shields.io/badge/tests-5%20passed%2C%205%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/dotnet-trx.trx|5 ✅|5 ❌|1 ⚪|1s|

View file

@ -1,7 +1,7 @@
[![Tests passed successfully](https://img.shields.io/badge/tests-803%20passed%2C%201%20skipped-success)](#test-report)
[![Tests passed successfully](https://img.shields.io/badge/tests-803%20passed%2C%201%20skipped-success)](#user-content-test-report)
<details><summary>Expand for details</summary>
# <a name="test-report"></a> Tests report
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/external/FluentValidation.Tests.trx|803 ✅||1 ⚪|4s|

View file

@ -1,7 +1,7 @@
[![Tests passed successfully](https://img.shields.io/badge/tests-1%20passed-success)](#test-report)
[![Tests passed successfully](https://img.shields.io/badge/tests-1%20passed-success)](#user-content-test-report)
<details><summary>Expand for details</summary>
# <a name="test-report"></a> Tests report
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/jest-junit-eslint.xml|1 ✅|||0ms|

View file

@ -1,5 +1,5 @@
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)](#test-report)
# <a name="test-report"></a> Tests report
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/jest-junit.xml|1 ✅|4 ❌|1 ⚪|1s|

View file

@ -1,7 +1,7 @@
[![Tests passed successfully](https://img.shields.io/badge/tests-1%20passed-success)](#test-report)
[![Tests passed successfully](https://img.shields.io/badge/tests-1%20passed-success)](#user-content-test-report)
<details><summary>Expand for details</summary>
# <a name="test-report"></a> Tests report
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/external/jest/jest-react-component-test-results.xml|1 ✅|||1000ms|

View file

@ -1,5 +1,5 @@
[![Tests failed](https://img.shields.io/badge/tests-4207%20passed%2C%202%20failed%2C%2030%20skipped-critical)](#test-report)
# <a name="test-report"></a> Tests report
[![Tests failed](https://img.shields.io/badge/tests-4207%20passed%2C%202%20failed%2C%2030%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/external/jest/jest-test-results.xml|4207 ✅|2 ❌|30 ⚪|166s|

View file

@ -1,5 +1,5 @@
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)](#test-report)
# <a name="test-report"></a> Tests report
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/mocha-json.json|1 ✅|4 ❌|1 ⚪|12ms|

View file

@ -1,7 +1,7 @@
[![Tests passed successfully](https://img.shields.io/badge/tests-833%20passed%2C%206%20skipped-success)](#test-report)
[![Tests passed successfully](https://img.shields.io/badge/tests-833%20passed%2C%206%20skipped-success)](#user-content-test-report)
<details><summary>Expand for details</summary>
# <a name="test-report"></a> Tests report
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/external/mocha/mocha-test-results.json|833 ✅||6 ⚪|6s|

View file

@ -1,5 +1,5 @@
[![Tests failed](https://img.shields.io/badge/tests-268%20passed%2C%201%20failed-critical)](#test-report)
# <a name="test-report"></a> Tests report
[![Tests failed](https://img.shields.io/badge/tests-268%20passed%2C%201%20failed-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/external/flutter/provider-test-results.json|268 ✅|1 ❌||0ms|

View file

@ -1,5 +1,5 @@
[![Tests failed](https://img.shields.io/badge/tests-1%20failed%2C%201%20skipped-critical)](#test-report)
# <a name="test-report"></a> Tests report
[![Tests failed](https://img.shields.io/badge/tests-1%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/external/java/TEST-org.apache.pulsar.AddMissingPatchVersionTest.xml||1 ❌|1 ⚪|116ms|

View file

@ -1,5 +1,5 @@
[![Tests failed](https://img.shields.io/badge/tests-793%20passed%2C%201%20failed%2C%2014%20skipped-critical)](#test-report)
# <a name="test-report"></a> Tests report
[![Tests failed](https://img.shields.io/badge/tests-793%20passed%2C%201%20failed%2C%2014%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/external/java/pulsar-test-report.xml|793 ✅|1 ❌|14 ⚪|2127s|

View file

@ -1,5 +1,5 @@
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%201%20failed%2C%201%20skipped-critical)](#test-report)
# <a name="test-report"></a> Tests report
[![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%201%20failed%2C%201%20skipped-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/rspec-json.json|1 ✅|1 ❌|1 ⚪|0ms|

View file

@ -1,7 +1,7 @@
[![Tests passed successfully](https://img.shields.io/badge/tests-67%20passed%2C%2012%20skipped-success)](#test-report)
[![Tests passed successfully](https://img.shields.io/badge/tests-67%20passed%2C%2012%20skipped-success)](#user-content-test-report)
<details><summary>Expand for details</summary>
# <a name="test-report"></a> Tests report
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/external/SilentNotes.trx|67 ✅||12 ⚪|1s|

View file

@ -1,5 +1,5 @@
[![Tests failed](https://img.shields.io/badge/tests-2%20passed%2C%201%20failed-critical)](#test-report)
# <a name="test-report"></a> Tests report
[![Tests failed](https://img.shields.io/badge/tests-2%20passed%2C%201%20failed-critical)](#user-content-test-report)
# <a name="user-content-test-report"></a> Tests report
|Report|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|fixtures/swift-xunit.xml|2 ✅|1 ❌||220ms|

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)

View file

@ -138,7 +138,7 @@ function getBadge(passed: number, failed: number, skipped: number, options: Repo
}
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: TestRunResult[], options: ReportOptions): string[] {
@ -149,7 +149,7 @@ function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): s
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