Skip to content

Commit

Permalink
Use more robust type check in test report action for test case names
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed May 30, 2024
1 parent 283f43d commit abcb871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/test-summary-report/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ runs:
const details = `<details><summary>View</summary>\n<pre>${failure[0].inner}</pre></details>`;
let testName = "";
if (testCase.name !== undefined && testCase.name.trim().length > 0) {
if ((typeof testCase.name === 'string' || testCase.name instanceof String) && (testCase.name.trim().length > 0)) {
testName = `<code>${testCase.name}</code>`;
if (testCase.name.trim().length > 25) {
testName = `<details><summary>View</summary>\n<code>${testCase.name}</code></details>`;
Expand Down

0 comments on commit abcb871

Please sign in to comment.