Skip to content

[9.0] Fix leaky Jest mock that causes the Scout Reporter to not some collect test events (#237837)#238095

Merged
kibanamachine merged 1 commit into
elastic:9.0from
kibanamachine:backport/9.0/pr-237837
Oct 8, 2025
Merged

[9.0] Fix leaky Jest mock that causes the Scout Reporter to not some collect test events (#237837)#238095
kibanamachine merged 1 commit into
elastic:9.0from
kibanamachine:backport/9.0/pr-237837

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

…t test events (elastic#237837)

We noticed we weren't collecting some Scout Reporter events for the
`src/cli_encryption_keys/jest.config.js` Jest config (we were just
collecting a single `run-begin` event, nothing more).

Upon further investigation, we noticed we were mocking/overwriting
`fs.writeFileSync` the method that the [Scout Jest
reporter](https://github.com/elastic/kibana/blob/main/src/platform/packages/private/kbn-scout-reporting/src/reporting/jest/reporter.ts)
relies on.

(cherry picked from commit 75d57f3)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Oct 8, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) October 8, 2025 15:58
@kibanamachine kibanamachine merged commit 0f2d663 into elastic:9.0 Oct 8, 2025
12 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @csr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants