diff --git a/dist/index.js b/dist/index.js index 75e2141..097c824 100644 --- a/dist/index.js +++ b/dist/index.js @@ -382,7 +382,7 @@ class TestReporter { if (tr.failed === 0) return; let runName = tr.path.slice(0, tr.path.indexOf('/TestResults/')); - runName = runName.slice(0, tr.path.indexOf('test/')); + runName = runName.startsWith('test/') ? runName.slice(5) : runName; req.blocks.push({ type: 'section', text: { diff --git a/src/main.ts b/src/main.ts index df6e6c3..0d3128a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -327,7 +327,7 @@ class TestReporter { results.map((tr, runIndex) => { if (tr.failed === 0) return let runName = tr.path.slice(0, tr.path.indexOf('/TestResults/')) - runName = runName.slice(0, tr.path.indexOf('test/')) + runName = runName.startsWith('test/') ? runName.slice(5) : runName req.blocks.push({ type: 'section',