Skip to content

Commit

Permalink
Fix duplicate function name
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Apr 23, 2022
1 parent 60bddd3 commit bcd43c7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/report-flaky-tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const metaData = {
[
TEST_RESULTS_LIST.open,
...testResultsList,
renderTestErrorMessage( {
renderTestResult( {
testRunner,
testPath,
testResults,
Expand Down Expand Up @@ -242,7 +242,7 @@ function renderIssueBody( {
} ) {
return (
renderIssueDescription( { meta, testTitle, testPath } ) +
renderTestResults( { testRunner, testPath, testResults } )
renderTestResultsList( { testRunner, testPath, testResults } )
);
}

Expand All @@ -263,14 +263,14 @@ ${ testTitle }
`;
}

function renderTestResults( { testRunner, testPath, testResults } ) {
function renderTestResultsList( { testRunner, testPath, testResults } ) {
return `${ TEST_RESULTS_LIST.open }
${ renderTestErrorMessage( { testRunner, testPath, testResults } ) }
${ renderTestResults( { testRunner, testPath, testResults } ) }
${ TEST_RESULTS_LIST.close }
`;
}

function renderTestResults( { testRunner, testResults, testPath } ) {
function renderTestErrorMessage( { testRunner, testResults, testPath } ) {
switch ( testRunner ) {
case '@playwright/test': {
// Could do a slightly better formatting than this.
Expand All @@ -297,7 +297,7 @@ function renderTestResults( { testRunner, testResults, testPath } ) {
}
}

function renderTestErrorMessage( { testRunner, testPath, testResults } ) {
function renderTestResults( { testRunner, testPath, testResults } ) {
const date = new Date().toISOString();
// It will look something like this without formatting:
// ▶ [2021-08-31T16:15:19.875Z] Test passed after 2 failed attempts on trunk
Expand All @@ -310,7 +310,7 @@ function renderTestErrorMessage( { testRunner, testPath, testResults } ) {
</summary>
\`\`\`
${ renderTestResults( { testRunner, testPath, testResults } ) }
${ renderTestErrorMessage( { testRunner, testPath, testResults } ) }
\`\`\`
</details>${ TEST_RESULT.close }`;
}
Expand Down

0 comments on commit bcd43c7

Please sign in to comment.