-
Notifications
You must be signed in to change notification settings - Fork 325
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 to version 27 #6361
base: 2.5
Are you sure you want to change the base?
Conversation
@@ -9,7 +9,7 @@ jest.mock('../../stores/metadataStore', () => ({ | |||
getSchema: jest.fn(), | |||
})); | |||
|
|||
test('Create a MemoryFormStore with schema', (done) => { | |||
test('Create a MemoryFormStore with schema', () => { |
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.
a test cannot return a promise and use the done
callback at the same time anymore:
https://jestjs.io/blog/2021/05/25/jest-27#features-coming-with-breaking-changes
@@ -43,7 +43,7 @@ | |||
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.1", | |||
"autoprefixer": "^9.8.6", | |||
"babel-eslint": "^10.0.2", | |||
"babel-jest": "^26.3.0", | |||
"babel-jest": "^27.3.1", |
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.
unfortunately, it looks like the new jest-circus
runner fails when comparing a normal array with an observable array now. this leads to a lot of errors like this when running the tests:
FAIL src/Sulu/Bundle/AdminBundle/Resources/js/containers/FieldBlocks/tests/FieldBlocks.test.js
● Should pass new value to the BlockCollection if value prop is updated
expect(received).toEqual(expected) // deep equality
Expected: [{"text": "One", "type": "default"}]
Received: serializes to the same string
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 suspect that this problem could be solved by updating to a new version of mobx. but unfortunately we are stuck at version 4 until the next major release (see #6343) 😕
What's in this PR?
This PR updates the
jest
package from version 26 to version 27. See the official release blog for a list of changes between the versions.