Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Sep 9, 2021
1 parent f306911 commit e5499d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/report-flaky-tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ ${ TEST_RESULTS_LIST.close }

function renderTestErrorMessage( { 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
return `${ TEST_RESULT.open }<details>
<summary>
<time datetime="${ date }"><code>[${ date }]</code></time>
Expand Down
1 change: 1 addition & 0 deletions packages/e2e-tests/config/setup-test-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jest.setTimeout( PUPPETEER_TIMEOUT || 100000 );
// Retry failed tests at most 2 times in CI.
// This enables `flaky-tests-reporter` and `report-flaky-tests` GitHub action
// to mark test as flaky and automatically create a tracking issue about it.
// Currently it will only run on trunk but will roll out to all PRs when mature.
if ( process.env.CI && process.env.GITHUB_EVENT_NAME !== 'pull_request' ) {
jest.retryTimes( 2 );
}
Expand Down
2 changes: 2 additions & 0 deletions packages/e2e-tests/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ module.exports = {
],
reporters: [
...baseConfig.reporters,
// Report flaky tests results into artifacts for used in `report-flaky-tests` action.
// Currently it will only run on trunk but will roll out to all PRs when mature.
process.env.CI &&
process.env.GITHUB_EVENT_NAME !== 'pull_request' &&
'<rootDir>/config/flaky-tests-reporter.js',
Expand Down

0 comments on commit e5499d3

Please sign in to comment.