Skip to content

Commit

Permalink
Add comment and fix dot
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Apr 7, 2022
1 parent 5162521 commit 14e987e
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/report-flaky-tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,27 @@ const metaData = {
TEST_RESULTS_LIST.open.length,
body.indexOf( TEST_RESULTS_LIST.close )
)
/**
* Split the text from:
* ```
* <!-- __TEST_RESULT__ --> Test result 1 <!-- /__TEST_RESULT__ -->
* ...
* <!-- __TEST_RESULT__ --> Test result 2 <!-- /__TEST_RESULT__ -->
* <!-- __TEST_RESULT__ --> Test result 3 <!-- /__TEST_RESULT__ -->
* ```
*
* into:
* ```
* [
* '<!-- __TEST_RESULT__ --> Test result 1 <!-- /__TEST_RESULT__ -->',
* '<!-- __TEST_RESULT__ --> Test result 2 <!-- /__TEST_RESULT__ -->',
* '<!-- __TEST_RESULT__ --> Test result 3 <!-- /__TEST_RESULT__ -->',
* ]
* ```
*/
.split(
new RegExp(
`(?<=${ TEST_RESULT.close })\n(?:...\n)?(?=${ TEST_RESULT.open })`
`(?<=${ TEST_RESULT.close })\n(?:\.\.\.\n)?(?=${ TEST_RESULT.open })`
)
);
// GitHub issues has character limits on issue's body,
Expand Down

0 comments on commit 14e987e

Please sign in to comment.