1
0
Fork 0
mirror of https://github.com/dorny/test-reporter.git synced 2026-03-21 23:52:12 +01:00

Merge pull request #731 from dt-thomas-durand/feat/slug-prefix

This commit is contained in:
Jozef Izso 2026-03-15 12:49:16 +01:00 committed by GitHub
commit 540c28072b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 50 additions and 4 deletions

12
dist/index.js generated vendored
View file

@ -55471,6 +55471,8 @@ function getOctokit(token, options, ...additionalPlugins) {
return new GitHubWithPlugins(getOctokitOptions(token, options));
}
//# sourceMappingURL=github.js.map
// EXTERNAL MODULE: external "node:crypto"
var external_node_crypto_ = __nccwpck_require__(7598);
// EXTERNAL MODULE: ./node_modules/adm-zip/adm-zip.js
var adm_zip = __nccwpck_require__(1316);
// EXTERNAL MODULE: ./node_modules/picomatch/index.js
@ -55957,7 +55959,7 @@ function getExceptionSource(stackTrace, trackedFiles, getRelativePath) {
;// CONCATENATED MODULE: ./lib/utils/slugger.js
function slug(name, options) {
const slugId = name
const slugId = `${options.slugPrefix}${name}`
.trim()
.replace(/_/g, '')
.replace(/[./\\]/g, '-')
@ -55979,6 +55981,7 @@ const MAX_ACTIONS_SUMMARY_LENGTH = 1048576;
const DEFAULT_OPTIONS = {
listSuites: 'all',
listTests: 'all',
slugPrefix: '',
baseUrl: '',
onlySummary: false,
useActionsSummary: true,
@ -57951,6 +57954,7 @@ class NetteTesterJunitParser {
async function main() {
try {
@ -57978,6 +57982,7 @@ class TestReporter {
workDirInput = getInput('working-directory', { required: false });
onlySummary = getInput('only-summary', { required: false }) === 'true';
useActionsSummary = getInput('use-actions-summary', { required: false }) === 'true';
slugPrefix = `tr-${(0,external_node_crypto_.randomBytes)(4).toString('base64url')}-`;
badgeTitle = getInput('badge-title', { required: false });
reportTitle = getInput('report-title', { required: false });
collapsed = getInput('collapsed', { required: false });
@ -58051,6 +58056,7 @@ class TestReporter {
setOutput('failed', failed);
setOutput('skipped', skipped);
setOutput('time', time);
setOutput('slug_prefix', this.slugPrefix);
if (this.failOnError && isFailed) {
setFailed(`Failed test were found and 'fail-on-error' option is set to ${this.failOnError}`);
return;
@ -58077,7 +58083,7 @@ class TestReporter {
throw error;
}
}
const { listSuites, listTests, onlySummary, useActionsSummary, badgeTitle, reportTitle, collapsed } = this;
const { listSuites, listTests, slugPrefix, onlySummary, useActionsSummary, badgeTitle, reportTitle, collapsed } = this;
const passed = results.reduce((sum, tr) => sum + tr.passed, 0);
const failed = results.reduce((sum, tr) => sum + tr.failed, 0);
const skipped = results.reduce((sum, tr) => sum + tr.skipped, 0);
@ -58087,6 +58093,7 @@ class TestReporter {
const summary = getReport(results, {
listSuites,
listTests,
slugPrefix,
baseUrl,
onlySummary,
useActionsSummary,
@ -58115,6 +58122,7 @@ class TestReporter {
const summary = getReport(results, {
listSuites,
listTests,
slugPrefix,
baseUrl,
onlySummary,
useActionsSummary,