-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update jest (main) #173227
Merged
Merged
Update jest (main) #173227
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ee1bc55
Update jest
elastic-renovate-prod[bot] 4250a1c
[CI] Auto-commit changed files from 'node scripts/yarn_deduplicate'
kibanamachine 99ad616
Merge branch 'main' into renovate/main-jest
delanni 18196cc
Fix some tests
afharo 6377221
Fix another suite
afharo 5bf0e09
More tests
afharo 0e4d3f3
synthetics tests
afharo 1a9408d
alerting task runner tests
afharo 2f46db5
Actions tests
afharo bfd6dce
Fix percentile.test
afharo 3cfa28b
Fix @kbn/test auth session_manager tests
afharo 0823431
Remove commented code
afharo 3b2e919
Merge branch 'main' into renovate/main-jest
afharo be642b6
Merge branch 'main' of github.com:elastic/kibana into renovate/main-jest
afharo b8c6716
Fix `fleet` test
afharo a928e6e
Merge branch 'main' into renovate/main-jest
afharo 209853a
reporting: destroy streams in afterEach
afharo 3c3a872
Merge branch 'main' into renovate/main-jest
dmlemeshko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afharo totally fine with the change, but could you explain why it is required after update?
Is there something specific about
createCloudSAMLSession
function?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find anything in the changelogs, but my observation in this PR is that
jest
changed (broke? 🤷) how spies are reset via thejest.reset/restoreAllMocks
and the specificmyMock.mockReset/Restore
.This means the pattern global spy +
jest.reset/restoreAllMocks
didn't work in some cases. I found that recreating the spy on each run was more stable (but lazy me, only changed it for those breaking the tests 😇)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I will update other tests later.