-
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
Update jest (main) #173227
Conversation
Pinging @elastic/kibana-operations (Team:Operations) |
101ee23
to
a021ff6
Compare
/ci |
bbd7ece
to
d4c4b36
Compare
/ci |
1 similar comment
/ci |
af05ee3
to
ee1bc55
Compare
/ci |
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
/ci |
/ci |
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.
Response Ops changes LGTM
/ci |
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.
Shared UX changes LGTM
/ci |
Pinging @elastic/fleet (Team:Fleet) |
/ci |
/ci |
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.
Fleet changes LGTM 🚀
let createCloudSAMLSessionMock: jest.SpyInstance; | ||
beforeEach(() => { | ||
createCloudSAMLSessionMock = jest.spyOn(samlAuth, 'createCloudSAMLSession'); | ||
}); |
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 the jest.reset/restoreAllMocks
and the specific myMock.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.
only changed it for those breaking the tests
Thank you! I will update other tests 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.
LGTM from Entity analytics
/ci |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
The CI Stats report is too large to be displayed here, check out the CI build annotation for this information. History
To update your PR or re-run it, just comment with: |
Why was I pinged for review?
It looks like this new version is a bit more sensitive with the global
jest.clearAllMocks()
,jest.resetAllMocks()
, andjest.restoreAllMocks()
.My understanding after try-and-error is that spies are only cleared via
jest.restoreAllMocks()
.This PR contains the following updates:
^29.6.1
->^29.7.0
^29.6.1
->^29.7.0
^29.6.1
->^29.6.3
^29.6.1
->^29.7.0
^29.6.1
->^29.7.0
^29.6.1
->^29.7.0
^29.6.1
->^29.7.0
^29.6.1
->^29.7.0
^29.6.1
->^29.7.0
^29.6.1
->^29.7.0
^29.6.1
->^29.7.0
^29.6.1
->^29.7.0
^29.6.1
->^29.7.0
^29.6.1
->^29.7.0
Release Notes
jestjs/jest (@jest/console)
v29.7.0
Compare Source
Features
[create-jest]
Addnpm init
/yarn create
initialiser for Jest projects (#14465)[jest-validate]
Allow deprecation warnings for unknown options (#14499)Fixes
[jest-resolver]
Replace unmatched capture groups inmoduleNameMapper
with empty string instead ofundefined
(#14507)[jest-snapshot]
Allow for strings as well as template literals in inline snapshots (#14465)[@jest/test-sequencer]
Calculate test runtime ifperStats.duration
is missing (#14473)Performance
[@jest/create-cache-key-function]
Cache access ofNODE_ENV
andBABEL_ENV
(#14455)Chore & Maintenance
[jest-cli]
Move internal config initialisation logic to thecreate-jest
package (#14465)v29.6.4
Compare Source
Fixes
[jest-core]
Fix typo inscheduleAndRun
performance marker (#14434)[jest-environment-node]
Make sureatob
andbtoa
are writeable in Node 20 (#14446)[jest-worker]
Additional error wrapper forparentPort.postMessage
to fix unhandledDataCloneError
. (#14437)v29.6.3
Compare Source
Fixes
[expect, @​jest/expect-utils]
ObjectContaining
supportsumbol
as key (#14414)[expect]
Remove@types/node
from dependencies (#14385)[jest-core]
Use workers in watch mode by default to avoid crashes (#14059 & #14085).[jest-reporters]
Updateistanbul-lib-instrument
dependency to v6. (#14401)[jest-mock]
Revert #13692 as it was a breaking change (#14429)[jest-mock]
Revert #13866 as it was a breaking change (#14429)[jest-mock]
Revert #13867 as it was a breaking change (#14429)[@jest/reporters]
Marks Reporter's hooks as optional (#14433)[jest-runtime]
Fix dynamic ESM import module bug when loaded module throughjest.isolateModulesAsync
(#14397)Chore & Maintenance
[jest-changed-files, jest-circus, jest-console, @​jest/core, @​jest/runtime, @​jest/transform]
Useinvariant
andnotEmpty
fromjest-util
rather than own internal (#14366)v29.6.2
Compare Source
Fixes
[jest-circus]
Fix snapshot matchers in concurrent tests when nr of tests exceedsmaxConcurrency
(#14335)[@jest/core]
When running global setup and teardown, do not try to change themessage
property of the thrown error object when themessage
property is unwritable (#14113)[jest-snapshot]
Move@types/prettier
fromdependencies
todevDependencies
(#14328)[jest-snapshot]
Throw an explicit error if Prettier v3 is used (#14367)[jest-reporters]
Add "skipped" and "todo" symbols to Github Actions Reporter (#14309)Chore & Maintenance
[@jest/core]
Usepluralize
fromjest-util
rather than own internal (#14322)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Renovate Bot.